Exception: Filterameter::DeclarationErrors::NoSuchAttributeError
- Inherits:
-
DeclarationError
- Object
- StandardError
- DeclarationError
- Filterameter::DeclarationErrors::NoSuchAttributeError
- Defined in:
- lib/filterameter/declaration_errors/no_such_attribute_error.rb
Overview
# No Such Attribute Error
Error NoSuchAttributeError occurs when a filter or sort references an attribute that does not exist on the model. The most likely case of this is a typo. Note that if the typo was supposed to reference a scope, this error is added as attributes are assumed when no matching scopes are found.
Instance Method Summary collapse
-
#initialize(model_name, attribute_name) ⇒ NoSuchAttributeError
constructor
A new instance of NoSuchAttributeError.
Constructor Details
#initialize(model_name, attribute_name) ⇒ NoSuchAttributeError
Returns a new instance of NoSuchAttributeError.
11 12 13 |
# File 'lib/filterameter/declaration_errors/no_such_attribute_error.rb', line 11 def initialize(model_name, attribute_name) super("Attribute '#{attribute_name}' does not exist on #{model_name}") end |