instance method validate_each

Ruby on Rails 3.1.12

Since v3.1.12 Last seen in v3.2.22.5

Available in: v3.1.12 v3.2.22.5

Signature

validate_each(record, attr, val)

No documentation comment.

Parameters

record req
attr req
val req
Source
# File activemodel/lib/active_model/validations/with.rb, line 12
      def validate_each(record, attr, val)
        method_name = options[:with]

        if record.method(method_name).arity == 0
          record.send method_name
        else
          record.send method_name, attr
        end
      end

Defined in activemodel/lib/active_model/validations/with.rb line 12 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveModel::Validations::WithValidator

Type at least 2 characters to search.

↑↓ navigate · open · esc close