Exception: Madoka::ModelInvalid
- Inherits:
-
StandardError
- Object
- StandardError
- Madoka::ModelInvalid
- Defined in:
- lib/madoka/model_invalid.rb
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Instance Method Summary collapse
-
#initialize(model) ⇒ ModelInvalid
constructor
A new instance of ModelInvalid.
Constructor Details
#initialize(model) ⇒ ModelInvalid
Returns a new instance of ModelInvalid.
4 5 6 7 8 |
# File 'lib/madoka/model_invalid.rb', line 4 def initialize(model) @model = model errors = @model.errors..join(", ") super(I18n.t("activerecord.errors.messages.record_invalid", :errors => errors)) end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
3 4 5 |
# File 'lib/madoka/model_invalid.rb', line 3 def model @model end |