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
47 48 49 50 51 52 53 |
# File 'lib/html5_validators/action_view/form_helpers.rb', line 47 def render if object.is_a?(ActiveModel::Validations) && (object.auto_html5_validation != false) && (object.class.auto_html5_validation != false) ["max"] ||= ["max"] || [:max] || object.attribute_max(@method_name) ["min"] ||= ["min"] || [:min] || object.attribute_min(@method_name) end super end |