lib/active_remote/validations.rb in active_remote-7.0.0 vs lib/active_remote/validations.rb in active_remote-7.1.0
- old
+ new
@@ -43,16 +43,16 @@
# example Is the record valid for creation?
# post.valid?(:create)
#
def valid?(context = nil)
context ||= (new_record? ? :create : :update)
- output = super(context)
+ output = super
errors.empty? && output
end
alias_method :validate, :valid?
- protected
+ protected
def raise_validation_error
fail ActiveRemote::RemoteRecordInvalid, self
end