Module: TimeOfDayAttr::FormBuilderExtension
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/time_of_day_attr/form_builder_extension.rb
Instance Method Summary collapse
Instance Method Details
#time_of_day_field(method, options = {}) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/time_of_day_attr/form_builder_extension.rb', line 5 def time_of_day_field(method, = {}) [:value] ||= begin value = object.public_send(method) = .extract!(:format, :omit_minutes_at_full_hour) TimeOfDayAttr.localize(value, ) end text_field(method, ) end |