I have a table called ''cars''.
id name
------------
1 Hyundai Accent
2 Chevy Impala
3 Merecedes C Class
I would like to know the users opinions on each of these cars, so I have
setup a table called ''car_opinions'':
id user_id car_id opinion
-------------------------------------
1 1 1 Love it!
2 1 2 Bumpy ride.
3 1 3 Too expensive
The create form should look like :
Hyundai Accent : _____________
Chevy Impala : _____________
Mercedes C Class : _____________
After creating the records for the user,
the edit form would look like :
Hyundai Accent : _Love It!_
Chevy Impala : _Bumpy Ride_
Mercedes C Class : _Too expensive_
So this isn''t a trivial mapping of column to object. I am mapping a
dynamic set of objects (the cars) to a dynamic set of opinions.
As far as I can tell, I can''t just use the simple form_for construct?
Thanks for any help provided.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---