time_select & select_time

199 views
Skip to first unread message

mow...@googlemail.com

unread,
Aug 4, 2008, 7:25:02 AM8/4/08
to ActiveScaffold : Ruby on Rails plugin
Hey there,

I like to set my time dropdowns to the current time + next possible 15
min. While select_time takes this as the very first argument, I can't
figure how to pass it my object which this should be saved in. Vice
versa, I can manage to save my time picked with time_select, but can't
figure howto automatically fill in the right values...

def time_form_column(record, input_name)
select_time(Time.now, :minute_step => 15)
time_select :record, :time, { :minute_step => 15, :name =>
input_name }
end

can someone give me a quick hint?

thanks
mowsen

mow...@googlemail.com

unread,
Aug 4, 2008, 7:30:26 AM8/4/08
to ActiveScaffold : Ruby on Rails plugin
ahh, just stumbled upon it.. change this to whatever you like:

:default => { :hour => 23, :minute => 0 }
Reply all
Reply to author
Forward
0 new messages