Some fields not posting

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

Thanks Fred, just had figured out what I need to do, as it's now working in one field (one corrected)

Prior - I had a helper that had a bunch of methods such as: def liststates @states = State.find(:all, :order => "name") end

So in my collection select I had to call the method liststates. Now I tried just throwing @states = State.find(:all, :order => "name") in the helper but get a nil error when i called up the form. So I moved it to the controller action and then <%= collection_select(:position, :state_id , @states, :id, :name, ........ with position being the model and state_id the method to update the table. So I guess I"m good to go.

Stuart