Exception: JSONAPI::Exceptions::PageParametersNotAllowed
- Defined in:
- lib/jsonapi/exceptions.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
Returns the value of attribute params.
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(params) ⇒ PageParametersNotAllowed
constructor
A new instance of PageParametersNotAllowed.
Constructor Details
#initialize(params) ⇒ PageParametersNotAllowed
Returns a new instance of PageParametersNotAllowed.
362 363 364 |
# File 'lib/jsonapi/exceptions.rb', line 362 def initialize(params) @params = params end |
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params.
361 362 363 |
# File 'lib/jsonapi/exceptions.rb', line 361 def params @params end |
Instance Method Details
#errors ⇒ Object
366 367 368 369 370 371 372 373 |
# File 'lib/jsonapi/exceptions.rb', line 366 def errors params.collect do |param| JSONAPI::Error.new(code: JSONAPI::PARAM_NOT_ALLOWED, status: :bad_request, title: 'Page parameter not allowed', detail: "#{param} is not an allowed page parameter.") end end |