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.
355 356 357 |
# File 'lib/jsonapi/exceptions.rb', line 355 def initialize(params) @params = params end |
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params.
354 355 356 |
# File 'lib/jsonapi/exceptions.rb', line 354 def params @params end |
Instance Method Details
#errors ⇒ Object
359 360 361 362 363 364 365 366 |
# File 'lib/jsonapi/exceptions.rb', line 359 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 |