module Html5Validators::ActionViewExtension::NumericalityValidator

Public Instance Methods

render() click to toggle source
Calls superclass method
# 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)
    @options["max"] ||= @options["max"] || @options[:max] || object.attribute_max(@method_name)
    @options["min"] ||= @options["min"] || @options[:min] || object.attribute_min(@method_name)
  end
  super
end