Module: Html5Validators::ActionViewExtension::NumericalityValidator
- Included in:
- ActionView::Helpers::Tags::TextField
- Defined in:
- lib/html5_validators/action_view/form_helpers.rb
Instance Method Summary collapse
Instance Method Details
#render ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/html5_validators/action_view/form_helpers.rb', line 35 def render if object.class.ancestors.include?(ActiveModel::Validations) && (object.auto_html5_validation != false) && (object.class.auto_html5_validation != false) ["max"] ||= ["max"] || [:max] || object.class.attribute_max(@method_name) ["min"] ||= ["min"] || [:min] || object.class.attribute_min(@method_name) end super end |