Results 1 to 1 of 1
Mar 15, 2011, 09:33 #1
- Join Date
- Oct 2004
- 0 Post(s)
- 0 Thread(s)
how set time_select value in model
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 %>
#virtual attr: def duration_type=(val) if(val == I18n.t(:days)) self.duration.hour=0 self.duration.min=0 end end
How could I do this ?