Exception: ActiveRemote::RemoteRecordInvalid

Inherits:
ActiveRemoteError show all
Defined in:
lib/active_remote/errors.rb

Overview

Raised by ActiveRemote::Validations when save is called on an invalid record.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(record) ⇒ RemoteRecordInvalid

Returns a new instance of RemoteRecordInvalid.



19
20
21
22
23
# File 'lib/active_remote/errors.rb', line 19

def initialize(record)
  @record = record
  errors = @record.errors.full_messages.join(", ")
  super(errors)
end

Instance Attribute Details

#recordObject (readonly)

Returns the value of attribute record.



17
18
19
# File 'lib/active_remote/errors.rb', line 17

def record
  @record
end