Class: SimpleForm::Inputs::RangeInput

Inherits:
NumericInput show all
Defined in:
lib/simple_form/inputs/range_input.rb

Instance Attribute Summary

Attributes inherited from Base

#attribute_name, #column, #html_classes, #input_html_classes, #input_html_options, #input_type, #options, #reflection

Instance Method Summary collapse

Methods inherited from Base

#additional_classes, disable, enable, #initialize, #input_class, #input_options

Methods included from SimpleForm::I18nCache

#get_i18n_cache, #i18n_cache, #reset_i18n_cache

Methods included from Components::Readonly

#readonly

Methods included from Components::Placeholders

#placeholder, #placeholder_text

Methods included from Components::Pattern

#pattern

Methods included from Components::MinMax

#min_max

Methods included from Components::Maxlength

#maxlength

Methods included from Components::LabelInput

#label_input

Methods included from Components::HTML5

#has_required?, #html5, #html5?, #initialize

Methods included from Components::Hints

#has_hint?, #hint

Methods included from Components::Errors

#error, #has_errors?

Methods included from Helpers::Validators

#has_validators?

Constructor Details

This class inherits a constructor from SimpleForm::Inputs::Base

Instance Method Details

#inputObject



4
5
6
7
8
9
10
11
# File 'lib/simple_form/inputs/range_input.rb', line 4

def input
  if html5?
    input_html_options[:type] ||= "range"
    input_html_options[:step] ||= 1
  end

  super
end