Using form fields that arent in database

Basically I need to know how to use forms fields when the attribute name for it doesn't match a field in my database. I have a form like this.

<td><%= date_select 'assessment', 'ends_at_date', :value => "Click here..." %> <%= time_select 'assessment', 'ends_at_time'%></td>

My database has a field called ends_at which is a datetime field that should have the combination of these 2 forms fields. However, I dont know how to interact with the values of form fields with ruby in order to do that. This gives me an error right now because there are no database fields called ends_at_date or ends_at_time to correspond to. Does anyone know how i can take the values of these fields and mess with them so i can input what i want in my ends_at field? Perhaps through the model or controller. Thanks alot :smiley:

Sounds like what you need is a virtual attribute. Check out the Railscast on it at: