On May 23, 12:23 pm, QAS WM <li...@ruby-forum.com> wrote:
> 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.
>

So what does get saved in the database. What does the params hash look
like at the point where this code runs?

Fred

> But for some reasons the values of the params do not get saved in the
> db. What am i doing wrong?
>
> --
> Posted viahttp://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@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to