Problems with select pulldowns combined with has_many :through

mrmarkham
2006-09-21T03:33:19Z

I''m having problems with the above.  For description purposes,
let''s
just assume I have 3 models:  User, Movie and Viewings, with the
following obvious fields:

users - name
movies - name
viewings - user_id, movie_id

I''m trying to use collection_select to create the appropriate pulldown,
but the following isn''t working:

collection_select("user", "viewings.movie_id", @movies,
"id", "name")

When I run it, I''m getting the following:

undefined method `viewings.movie_id'' for #<User:0x23a32b8>

What am I missing?

- Andy


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---