Exception: Mongoid::Errors::ScopeOverwrite
- Inherits:
-
MongoidError
- Object
- StandardError
- MongoidError
- Mongoid::Errors::ScopeOverwrite
- Defined in:
- lib/mongoid/errors/scope_overwrite.rb
Overview
This error is raised when trying to create a scope with an name already taken by another scope or method
Constant Summary
Constants inherited from MongoidError
Instance Method Summary collapse
-
#initialize(model_name, scope_name) ⇒ ScopeOverwrite
constructor
A new instance of ScopeOverwrite.
Methods inherited from MongoidError
Constructor Details
#initialize(model_name, scope_name) ⇒ ScopeOverwrite
Returns a new instance of ScopeOverwrite.
11 12 13 14 15 16 17 18 |
# File 'lib/mongoid/errors/scope_overwrite.rb', line 11 def initialize(model_name,scope_name) super( translate( "scope_overwrite", { :model_name => model_name, :scope_name => scope_name } ) ) end |