Creating my own FormBuilder turned out to be too cumbersome for one simple extension I wanted to add.
Turns out the minute_select function already has a start (offset) parameter which is defaulted to 0. Simply passing an extra argument down fixed the issue. (minute_offset is the new option here)
ActionView::Helpers::DateTimeSelector.class_eval do
def select_minute
if @options[:use_hidden] || @options[:discard_minute]
build_hidden(:minute, min)
else
build_options_and_select(:minute, min, :step => @options[:minute_step], :start => (@options[:minute_offset] || 0) % (@options[:minute_step] || 60))
end
end
end
I am taking suggestions on how to do this more cleanly as opposed to this global monkey patching