Help with serialization

QAS WM
Mon, 23 May 2011 11:23:23 -0000

in my migration is have:

     t.string   :options

in my model i have:

     serialize :options

in my controller create and update I am doing the following:

  @vehicle.options = {:ac_front => params[:ac_front],
    :ac_rear => params[:ac_rear],
    :air_bag_driver => params[:air_bag_driver],
    :air_bag_passenger => params[:air_bag_passenger],
    :air_bag_side => params[:air_bag_side],
    :alloy_wheels => params[:alloy_wheels] }

where all the params being passed are boolean true or false values.

But for some reasons the values of the params do not get saved in the
db. What am i doing wrong?

--
Posted via http://www.ruby-forum.com/.