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 175
175:     def initialize(options, &block)
176:       @block = block
177:       super
178:     end

Private Instance Methods

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

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.