Exception: ActiveHash::RecordNotFound

Inherits:
StandardError
  • Object
show all
Defined in:
lib/active_hash/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, model = nil, primary_key = nil, id = nil) ⇒ RecordNotFound

Returns a new instance of RecordNotFound.



5
6
7
8
9
10
11
# File 'lib/active_hash/base.rb', line 5

def initialize(message = nil, model = nil, primary_key = nil, id = nil)
  @primary_key = primary_key
  @model = model
  @id = id

  super(message)
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/active_hash/base.rb', line 3

def id
  @id
end

#modelObject (readonly)

Returns the value of attribute model.



3
4
5
# File 'lib/active_hash/base.rb', line 3

def model
  @model
end

#primary_keyObject (readonly)

Returns the value of attribute primary_key.



3
4
5
# File 'lib/active_hash/base.rb', line 3

def primary_key
  @primary_key
end