Class Index [+]

Quicksearch

ActiveModel::BlockValidator

BlockValidator is a special EachValidator which receives a block on initialization and call this block for each attribute being validated. validates_each uses this validator.

Public Class Methods

new(options, &block) click to toggle source
     # File lib/active_model/validator.rb, line 173
173:     def initialize(options, &block)
174:       @block = block
175:       super
176:     end

Private Instance Methods

validate_each(record, attribute, value) click to toggle source
     # File lib/active_model/validator.rb, line 180
180:     def validate_each(record, attribute, value)
181:       @block.call(record, attribute, value)
182:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.