Exception: CapsuleCRM::Errors::RecordNotSaved

Inherits:
StandardError
  • Object
show all
Defined in:
lib/capsule_crm/errors/record_not_saved.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(record) ⇒ RecordNotSaved

Returns a new instance of RecordNotSaved.



6
7
8
# File 'lib/capsule_crm/errors/record_not_saved.rb', line 6

def initialize(record)
  @record = record
end

Instance Attribute Details

#recordObject (readonly)

Returns the value of attribute record.



4
5
6
# File 'lib/capsule_crm/errors/record_not_saved.rb', line 4

def record
  @record
end

Instance Method Details

#messageObject



10
11
12
13
14
15
# File 'lib/capsule_crm/errors/record_not_saved.rb', line 10

def message
  [
    'CapsuleCRM::Errors::RecordNotSaved',
    'You cannot call create unless the parent is saved'
  ].join(': ')
end