Exception: ActiveRemote::RemoteRecordNotFound

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

Overview

Raised by ActiveRemove::Base.find when remote record is not found when searching with the given arguments.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(class_or_message = "") ⇒ RemoteRecordNotFound

Returns a new instance of RemoteRecordNotFound.



28
29
30
31
32
33
34
35
36
37
# File 'lib/active_remote/errors.rb', line 28

def initialize(class_or_message = "")
  message = class_or_message

  if class_or_message.is_a?(Class)
    self.remote_record_class = class_or_message
    message = "#{remote_record_class} does not exist"
  end

  super(message)
end

Instance Attribute Details

#remote_record_classObject

Returns the value of attribute remote_record_class.



26
27
28
# File 'lib/active_remote/errors.rb', line 26

def remote_record_class
  @remote_record_class
end