Exception: JSONAPI::Exceptions::FilterNotAllowed
- Defined in:
- lib/jsonapi/exceptions.rb
Instance Attribute Summary collapse
-
#filter ⇒ Object
Returns the value of attribute filter.
Attributes inherited from Error
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(filter, error_object_overrides = {}) ⇒ FilterNotAllowed
constructor
A new instance of FilterNotAllowed.
Methods inherited from Error
Constructor Details
#initialize(filter, error_object_overrides = {}) ⇒ FilterNotAllowed
Returns a new instance of FilterNotAllowed.
204 205 206 207 |
# File 'lib/jsonapi/exceptions.rb', line 204 def initialize(filter, error_object_overrides = {}) @filter = filter super(error_object_overrides) end |
Instance Attribute Details
#filter ⇒ Object
Returns the value of attribute filter.
202 203 204 |
# File 'lib/jsonapi/exceptions.rb', line 202 def filter @filter end |
Instance Method Details
#errors ⇒ Object
209 210 211 212 213 214 215 216 |
# File 'lib/jsonapi/exceptions.rb', line 209 def errors [create_error_object(code: JSONAPI::FILTER_NOT_ALLOWED, status: :bad_request, title: I18n.translate('jsonapi-resources.exceptions.filter_not_allowed.title', default: 'Filter not allowed'), detail: I18n.translate('jsonapi-resources.exceptions.filter_not_allowed.detail', default: "#{filter} is not allowed.", filter: filter))] end |