Exception: JSONAPI::Exceptions::ParametersNotAllowed
- 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) ⇒ ParametersNotAllowed
constructor
A new instance of ParametersNotAllowed.
Constructor Details
#initialize(params) ⇒ ParametersNotAllowed
Returns a new instance of ParametersNotAllowed.
94 95 96 |
# File 'lib/jsonapi/exceptions.rb', line 94 def initialize(params) @params = params end |
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params.
93 94 95 |
# File 'lib/jsonapi/exceptions.rb', line 93 def params @params end |
Instance Method Details
#errors ⇒ Object
98 99 100 101 102 103 104 105 106 |
# File 'lib/jsonapi/exceptions.rb', line 98 def errors params.collect { |param| JSONAPI::Error.new(code: JSONAPI::PARAM_NOT_ALLOWED, status: :bad_request, title: 'Param not allowed', detail: "#{param} is not allowed.") } end |