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.
303 304 305 |
# File 'lib/jsonapi/exceptions.rb', line 303 def initialize(params) @params = params end |
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params.
302 303 304 |
# File 'lib/jsonapi/exceptions.rb', line 302 def params @params end |
Instance Method Details
#errors ⇒ Object
307 308 309 310 311 312 313 314 315 |
# File 'lib/jsonapi/exceptions.rb', line 307 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 |