lib/active_model/validator.rb in activemodel-5.0.0.beta2 vs lib/active_model/validator.rb in activemodel-5.0.0.beta3
- old
+ new
@@ -161,13 +161,9 @@
# Hook method that gets called by the initializer allowing verification
# that the arguments supplied are valid. You could for example raise an
# +ArgumentError+ when invalid options are supplied.
def check_validity!
end
-
- def should_validate?(record) # :nodoc:
- !record.persisted? || record.changed? || record.marked_for_destruction?
- end
end
# +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.
class BlockValidator < EachValidator #:nodoc: