lib/hydra/validations.rb in hydra-validations-0.3.1 vs lib/hydra/validations.rb in hydra-validations-0.3.2
- old
+ new
@@ -8,9 +8,17 @@
included do
extend HelperMethods
include HelperMethods
end
+ module ClassMethods
+ protected
+ # Overwrites ActiveModel::Validations::ClassMethods, adding :allow_empty
+ def _validates_default_keys
+ [:if, :unless, :on, :allow_blank, :allow_nil , :strict, :allow_empty]
+ end
+ end
+
end
end
Dir[File.dirname(__FILE__) + "/validations/*.rb"].each { |file| require file }