lib/validations/validates_true_for.rb in validatable-1.2.2 vs lib/validations/validates_true_for.rb in validatable-1.3.0
- old
+ new
@@ -1,8 +1,7 @@
module Validatable
class ValidatesTrueFor < ValidationBase #:nodoc:
- attr_accessor :logic
- understands :logic
+ required_option :logic
def valid?(instance)
instance.instance_eval(&logic) == true
end
\ No newline at end of file