class Formtastic::Inputs::TimeSelectInput
Outputs a series of select boxes for the fragments that make up a time (hour, minute, second). Unless `:ignore_date` is true, it will render hidden inputs for the year, month and day as well, defaulting to `Time.current` if the form object doesn't have a value, much like Rails' own `time_select`.
@see Formtastic::Inputs::Base::Timeish
Timeish module for documentation of date, time and datetime input options.
Public Instance Methods
fragment_value(fragment)
click to toggle source
# File lib/formtastic/inputs/time_select_input.rb, line 22 def fragment_value(fragment) value_or_default_value.send(fragment) end
fragments()
click to toggle source
we don't want year / month / day fragments if :ignore_date => true
# File lib/formtastic/inputs/time_select_input.rb, line 14 def fragments time_fragments end
value_or_default_value()
click to toggle source
# File lib/formtastic/inputs/time_select_input.rb, line 18 def value_or_default_value value ? value : Time.current end