I am having difficulty with extracting data from the collection_select
First, the code:
<%= collection_select :colors, :id, send_colors, :id, :color %>
view helper that polulates collection_select ‘send_colors’ -->>
@colors = Color.find(:all)
@color = Color.new(params[:color])
My problem is that when I submit the form, @color (in the controller) is
not being populated with any data. I have inspected the @color object
and it’s attributes are empty. When I view the HTML source in the web
browser, the select form value options are there but seemingly not
submitted back to controller. Perhaps my controller code is wrong.
Also, here’s some debug YAML output
<%= debug(params) %>
commit: Save changes
<%= debug(@color) %>
<%= debug(request) %>
changes”, “action”=>“create_debug”, “controller”=>“admin”,
What is this ‘HasWithIndifferentAccess’ about? Is this my problem?
Thanks for any assistance in advance!