Class: Tarantool::Model::RecordInvalid

Inherits:
Error
  • Object
show all
Defined in:
tarantool-model/lib/tarantool/model/errors.rb

Overview

save! or create! on a record that fails validation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(record) ⇒ RecordInvalid

Returns a new instance of RecordInvalid.



22
23
24
25
# File 'tarantool-model/lib/tarantool/model/errors.rb', line 22

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

Instance Attribute Details

#record ⇒ Object (readonly)

Returns the value of attribute record.



20
21
22
# File 'tarantool-model/lib/tarantool/model/errors.rb', line 20

def record
  @record
end