class JSONAPI::Exceptions::ParameterNotAllowed
Attributes
param[RW]
Public Class Methods
new(param, error_object_overrides = {})
click to toggle source
Calls superclass method
JSONAPI::Exceptions::Error::new
# File lib/jsonapi/exceptions.rb, line 393 def initialize(param, error_object_overrides = {}) @param = param super(error_object_overrides) end
Public Instance Methods
errors()
click to toggle source
# File lib/jsonapi/exceptions.rb, line 398 def errors [create_error_object(code: JSONAPI::PARAM_NOT_ALLOWED, status: :bad_request, title: I18n.translate('jsonapi-resources.exceptions.parameter_not_allowed.title', default: 'Param not allowed'), detail: I18n.translate('jsonapi-resources.exceptions.parameters_not_allowed.detail', default: "#{param} is not allowed.", param: param))] end