actionview/lib/action_view/helpers/date_helper.rb
# Builds a prompt option tag with supplied options or from default options.
#  prompt_option_tag(:month, prompt: 'Select month')
#  => "<option value="">Select month</option>"
Builds a prompt option tag with supplied options or from default options.
Builds a prompt option tag with supplied options or from default options .
def prompt_option_tag(type, options)
          prompt = \
            case options
            when Hash
              default_options = { year: false, month: false, day: false, hour: false, minute: false, second: false }
              default_options.merge!(options)[type.to_sym]
            when String
              options
            else
              I18n.translate(:"datetime.prompts.#{type}", locale: @options[:locale])
            end
          prompt ? content_tag("option", prompt, value: "") : ""
        end
def prompt_option_tag ( type , options ) prompt = case options when Hash default_options = { year : false , month : false , day : false , hour : false , minute : false , second : false } default_options . merge! ( options ) [ type . to_sym ] when String options else I18n . translate ( :" datetime.prompts. #{ type } " , locale : @options [ :locale ] ) end prompt ? content_tag ( "option" , prompt , value : "" ) : "" end
Builds a prompt option tag with supplied options or from default options.
Builds a prompt option tag with supplied options or from default options .
type
<not_specific>
options
<not_specific>