Exception: CouchbaseOrm::Error::RecordInvalid
- Inherits:
-
CouchbaseOrm::Error
- Object
- StandardError
- CouchbaseOrm::Error
- CouchbaseOrm::Error::RecordInvalid
- Defined in:
- lib/couchbase-orm/error.rb
Instance Attribute Summary
Attributes inherited from CouchbaseOrm::Error
Instance Method Summary collapse
-
#initialize(record = nil) ⇒ RecordInvalid
constructor
A new instance of RecordInvalid.
Constructor Details
#initialize(record = nil) ⇒ RecordInvalid
Returns a new instance of RecordInvalid.
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/couchbase-orm/error.rb', line 14 def initialize(record = nil) if record @record = record errors = @record.errors..join(', ') = I18n.t(:"#{@record.class.i18n_scope}.errors.messages.record_invalid", errors: errors, default: :"couchbase.errors.messages.record_invalid") else = 'Record invalid' end super(, record) end |