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.
329 330 331 |
# File 'lib/jsonapi/exceptions.rb', line 329 def initialize(params) @params = params end |
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params.
328 329 330 |
# File 'lib/jsonapi/exceptions.rb', line 328 def params @params end |
Instance Method Details
#errors ⇒ Object
333 334 335 336 337 338 339 340 341 |
# File 'lib/jsonapi/exceptions.rb', line 333 def errors params.collect { |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 |