Exception: Mongoid::Errors::Callback
- Inherits:
-
MongoidError
- Object
- StandardError
- MongoidError
- Mongoid::Errors::Callback
- Defined in:
- lib/mongoid/errors/callback.rb
Overview
This error is raised when calling #save! or .create! on a model when one of the callbacks returns false.
Constant Summary
Constants inherited from MongoidError
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
Instance Method Summary collapse
-
#initialize(klass, method) ⇒ Callback
constructor
Create the new callbacks error.
Methods inherited from MongoidError
Constructor Details
#initialize(klass, method) ⇒ Callback
Create the new callbacks error.
20 21 22 23 |
# File 'lib/mongoid/errors/callback.rb', line 20 def initialize(klass, method) @klass, @method = klass, method super(translate("callbacks", { :klass => klass, :method => method })) end |
Instance Attribute Details
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
9 10 11 |
# File 'lib/mongoid/errors/callback.rb', line 9 def klass @klass end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
9 10 11 |
# File 'lib/mongoid/errors/callback.rb', line 9 def method @method end |