Exception: ActiveRemote::RemoteRecordNotFound

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

Overview

Raised by ActiveRemote::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.



31
32
33
34
35
36
37
38
39
40
# File 'lib/active_remote/errors.rb', line 31

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.



29
30
31
# File 'lib/active_remote/errors.rb', line 29

def remote_record_class
  @remote_record_class
end