lib/scrivener/validations.rb in scrivener-1.0.0 vs lib/scrivener/validations.rb in scrivener-1.1.0
- old
+ new
@@ -65,17 +65,17 @@
# assert_present :user
# assert_present :password
# end
# end
#
- def valid?
+ def valid?(*args)
errors.clear
- validate
+ validate(*args)
errors.empty?
end
# Base validate implementation. Override this method in subclasses.
- def validate
+ def validate(*args)
end
# Hash of errors for each attribute in this model.
def errors
@errors ||= Hash.new { |hash, key| hash[key] = [] }