app/helpers/date_helper.rb
# This is to DRY up many of the legacy places where hour/min/meridian is used in forms
This is to DRY up many of the legacy places where hour/min/meridian is used in forms
This is to DRY up many of the legacy places where hour / min / meridian is used in forms
def time_select(f, field, options_tag = {}, html_options = {})
    output =  f.select(:"#{field}_hour", (1..12).to_a, {}, html_options.merge("aria-label": f.object.class.human_attribute_name("#{field}_hour")))
    output.safe_concat f.select(:"#{field}_min", minute_options(options_tag[:minute_step]), {}, html_options.merge("aria-label": f.object.class.human_attribute_name("#{field}_min")))
    output.safe_concat f.select(:"#{field}_meridian", %w(AM PM), {}, html_options.merge("aria-label": f.object.class.human_attribute_name("#{field}_meridian")))
    content_tag :div, output, class: "time-select"
  end
def time_select ( f , field , options_tag = { } , html_options = { } ) output = f . select ( :" #{ field } _hour " , ( 1 .. 12 ) . to_a , { } , html_options . merge ( "aria-label" : f . object . class . human_attribute_name ( "#{field}_hour" ) ) ) output . safe_concat f . select ( :" #{ field } _min " , minute_options ( options_tag [ :minute_step ] ) , { } , html_options . merge ( "aria-label" : f . object . class . human_attribute_name ( "#{field}_min" ) ) ) output . safe_concat f . select ( :" #{ field } _meridian " , %w( AM PM ) , { } , html_options . merge ( "aria-label" : f . object . class . human_attribute_name ( "#{field}_meridian" ) ) ) content_tag :div , output , class : "time-select" end
This is to DRY up many of the legacy places where hour/min/meridian is used in forms
This is to DRY up many of the legacy places where hour / min / meridian is used in forms
f
<not_specific>
field
<not_specific>
options_tag
<not_specific>
html_options
<not_specific>