Exception: GroongaClientModel::RecordInvalid
- Defined in:
- lib/groonga_client_model/error.rb
Instance Attribute Summary collapse
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Instance Method Summary collapse
-
#initialize(record) ⇒ RecordInvalid
constructor
A new instance of RecordInvalid.
Constructor Details
#initialize(record) ⇒ RecordInvalid
Returns a new instance of RecordInvalid.
36 37 38 39 40 41 42 43 44 |
# File 'lib/groonga_client_model/error.rb', line 36 def initialize(record) @record = record errors = @record.errors..join(", ") i18n_scope = @record.class.i18n_scope = I18n.t(:"#{i18n_scope}.errors.messages.record_invalid", errors: errors, default: :"errors.messages.record_invalid") super() end |
Instance Attribute Details
#record ⇒ Object (readonly)
Returns the value of attribute record.
34 35 36 |
# File 'lib/groonga_client_model/error.rb', line 34 def record @record end |