I''m trying to get a collection select list to work, but I''m
getting this
error: missing attribute: state_code
The code is a select list for states.
<%= collection_select(:states_code, :state, states.states_list,
:state_code, :state)%>
The above elements are as follows
1. table name (singular, full name is states_codes)
2. full name of state
3. select list that orders the states alphabetically (model and method)
4. state abbreviation for value
5. full name of state to display
Can anyone help me figure out what I''m doing wrong?
Thanks.
--
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
-~----------~----~----~----~------~----~------~--~---