Method: ActionView::Helpers::DateTimeSelector#select_hour

Defined in:
lib/action_view/helpers/date_helper.rb

#select_hourObject



806
807
808
809
810
811
812
813
814
815
816
# File 'lib/action_view/helpers/date_helper.rb', line 806

def select_hour
  if @options[:use_hidden] || @options[:discard_hour]
    build_hidden(:hour, hour)
  else
    options         = {}
    options[:ampm]  = @options[:ampm] || false
    options[:start] = @options[:start_hour] || 0
    options[:end]   = @options[:end_hour] || 23
    build_options_and_select(:hour, hour, options)
  end
end