lib/active_remote/errors.rb in active_remote-3.3.3 vs lib/active_remote/errors.rb in active_remote-5.0.0.pre

- old
+ new

@@ -16,11 +16,11 @@ class RemoteRecordInvalid < ActiveRemoteError attr_reader :record def initialize(record) @record = record - errors = @record.errors.full_messages.join(', ') + errors = @record.errors.full_messages.join(", ") super(errors) end end # Raised by ActiveRemote::Base.find when remote record is not found when @@ -41,19 +41,9 @@ end # Raised by ActiveRemove::Base.save! and ActiveRemote::Base.create! methods # when remote record cannot be saved because it is invalid. class RemoteRecordNotSaved < ActiveRemoteError - attr_reader :record - - def initialize(message_or_record = nil) - message = message_or_record - if message_or_record.is_a?(::ActiveRemote::Base) - @record = message_or_record - message = @record.errors.full_messages.join(", ") - end - super(message) - end end class UnknownAttributeError < ActiveRemoteError end