I have a object attr. called duration, its datatype is datetime.
I'm displaying this value using a time_select.
This generates several hidden text fields.
This is my page:
<%= f.time_select :duration, :minute_step => 10 %>
I want to set in the model hours and minutes to 00:00 when I select an option from a dropdown (a virtual attr.)
if(val == I18n.t(:days))
But this is crashing.
How could I do this ?