I'm working with a form where only entries in the text fields are being saved to the database. The options selected from the select lists are not. Not sure what I need to do.
Just to show how things are set up in the controller: def post @position = Position.new(params[:position]) @position.save end
Then in the view I'll show one text field and one select: <%= form_tag :action => 'post' %> #text field <%= text_field(:position, :title) %> #select <%= collection_select(:state, liststates, @states, :id, :name, { :include_blank => true } ) %>
The method liststates is in the helper to gather up the options from the table. The intention is to save the state id to the positions table in the column state_id. I'm gathering that the select statements need something else.
Hope it's okay to ask while I dig around.
TIA Stuart