Exception: JSONAPI::Exceptions::FilterNotAllowed
- Defined in:
- lib/jsonapi/exceptions.rb
Instance Attribute Summary collapse
-
#filter ⇒ Object
Returns the value of attribute filter.
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(filter) ⇒ FilterNotAllowed
constructor
A new instance of FilterNotAllowed.
Constructor Details
#initialize(filter) ⇒ FilterNotAllowed
Returns a new instance of FilterNotAllowed.
86 87 88 |
# File 'lib/jsonapi/exceptions.rb', line 86 def initialize(filter) @filter = filter end |
Instance Attribute Details
#filter ⇒ Object
Returns the value of attribute filter.
85 86 87 |
# File 'lib/jsonapi/exceptions.rb', line 85 def filter @filter end |
Instance Method Details
#errors ⇒ Object
90 91 92 93 94 95 |
# File 'lib/jsonapi/exceptions.rb', line 90 def errors [JSONAPI::Error.new(code: JSONAPI::FILTER_NOT_ALLOWED, status: :bad_request, title: 'Filter not allowed', detail: "#{filter} is not allowed.")] end |