class JSONAPI::Exceptions::PageParametersNotAllowed
Attributes
params[RW]
Public Class Methods
new(params, error_object_overrides = {})
click to toggle source
Calls superclass method
JSONAPI::Exceptions::Error::new
# File lib/jsonapi/exceptions.rb, line 555 def initialize(params, error_object_overrides = {}) @params = params super(error_object_overrides) end
Public Instance Methods
errors()
click to toggle source
# File lib/jsonapi/exceptions.rb, line 560 def errors params.collect do |param| create_error_object(code: JSONAPI::PARAM_NOT_ALLOWED, status: :bad_request, title: I18n.translate('jsonapi-resources.exceptions.page_parameters_not_allowed.title', default: 'Page parameter not allowed'), detail: I18n.translate('jsonapi-resources.exceptions.page_parameters_not_allowed.detail', default: "#{param} is not an allowed page parameter.", param: param)) end end