#rubyonrails - Sun 4 Mar 2007 between 08:07 and 08:20

NY Lost Funds



djsmacedogma_: and items can be in many menus
gma_djsmacedo: right. do you have a has_many :through defined in both models?
djsmacedooh! i've forgot item relation :)
gma_I did say that about half an hour ago... ;)
djsmacedohehehehehe
gma_probably should have re-iterated the point!
djsmacedosorry, i'm dumb :)
gma_does it work now?
dmnhi
djsmacedowait, let me see
dmnis it possible to express CHECK constraints and UNIQUE constraints on columns in rails without using native ddl in execute() ?
gma_dmn: I just searched the pragprog book.
dmn: short answer is "no, but..."
dmn: this may help: http://www.redhillonrails.org/
dmn: foreign key plugins
bryanldmn: kinda... you can set up a unique key, which will create a unique contrainst
constraint
but because rails has a mysql focus... those features weren't really baked in
dmngma_ i'm using redhill, but that's for FKs only
gma_dmn: okay. then I think the answer is no.
djsmacedopastie: hi!
dmnbryanl you mean a primary key ?
bryanl that's a different thing
bryanldmn: no not by a primary key
dmn: you can create a unique index
dmnah, right
got that.
pastiehttp://pastie.caboo.se/44574 by djsmacedo.
dmnit's really unfortunate, that rails developers have this, as you say "mysql focus"..
djsmacedogma_: same error... :|
gma_: i'm dumb! heheheh
dmni'd say the whole open source world seems to have an unreasonable mysql fixation
pythonicmysql sucks
gma_try :through => menu_items instead (i.e. not menus_items)
djsmacedo: that's a guess though
djsmacedo: and I tell you what, if you paste the whole error I might know what's trying to call it. right now I've no idea.
djsmacedo: the traceback, from your server console
dmnpythonic indeed!
gma_djsmacedo: what's your join model called?
djsmacedoi'll try has_and_belongs_to_many

Page: 4 11 18 25 32 39 46 53 60 67 74 81 88 95 102 109 

IrcArchive

NY Lost Funds