lib/validatable_class_methods.rb in validatable-1.6.3 vs lib/validatable_class_methods.rb in validatable-1.6.4
- old
+ new
@@ -19,9 +19,20 @@
end
end
end
end
end
+
+ def all_before_validations
+ if self.superclass.respond_to? :all_before_validations
+ return before_validations + self.superclass.all_before_validations
+ end
+ before_validations
+ end
+
+ def before_validations
+ @before_validations ||= []
+ end
def all_validations
return validations + self.superclass.all_validations if self.superclass.respond_to? :all_validations
validations
end
\ No newline at end of file