Forum: Ruby on Rails Setting AR attribute from date_select values?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
328f0bb678423fcea01ebe3b0edc74e6?d=identicon&s=25 Ben Johnson (benjohnson)
on 2007-07-30 18:16
I have a date select:

<%= form_fields.date_select :birthday_on, :order => [:month, :day,
:year], :start_year => 1900 %>

In my controller I want to set the individual attribute. How do I do
this?

user.birthday_on = params[:user][:birthday_on]

How do I convert this to a date so it set properly?

Thanks for your time!
This topic is locked and can not be replied to.