[Rails] Re: bug in multiple map.resources :has_many ?
by Rick Olson other posts by this author
Aug 13 2007 5:06PM messages near this date
[Rails] Re: bug in multiple map.resources :has_many ?
|
[Rails] HABTM: at least one coupled user
> No, it's not a bug. It's because of how Ruby hashes work. The last
> three lines are all key/value pairs in a hash. Since hash keys are
> unique, you can't have two :has_many keys, so the last one clobbers
> the previous one.
So, use an array instead. :has_many => [:foo, :bar]
--
Rick Olson
http://lighthouseapp.com
http://weblog.techno-weenie.net
http://mephistoblog.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Ta
lk" group.
To post to this group, send email to rubyonrails-talk@[...].com
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@[...].com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Thread:
Linojon
dblack
Rick Olson
|