devise - Rails Date Params -


i learning rails , have come across road block. guidance appreciated.

i using device , have :confirmed_at datetime column protected attribute. update admin interface super controller update method , add:

      @user.update_attribute(:confirmed_at, params[:user][:confirmed_at])       @user.update_attribute(:school_id, params[:user][:school_id]) 

:school_id gets update correctly :confirmed_at, datetime, nil. looked @ params hash , sure enough not have :confirmed_at has

      "confirmed_at(1i)"=>"2012",        "confirmed_at(2i)"=>"6",        "confirmed_at(3i)"=>"2",        "confirmed_at(4i)"=>"04",          "confirmed_at(5i)"=>"11" 

rails doesn't seem translating parameters fields datetime objects database.

** how capture these value update :confirmed_at field properly?

any appreciated.

rails 3.1, ruby 1.9

i guess you're using datetime_select helper.

check out: where rails method converts data `datetime_select` datetime object?


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -