class JSONAPI::Exceptions::FilterNotAllowed
Attributes
filter[RW]
Public Class Methods
new(filter, error_object_overrides = {})
click to toggle source
Calls superclass method
JSONAPI::Exceptions::Error::new
# File lib/jsonapi/exceptions.rb, line 204 def initialize(filter, error_object_overrides = {}) @filter = filter super(error_object_overrides) end
Public Instance Methods
errors()
click to toggle source
# File lib/jsonapi/exceptions.rb, line 209 def errors [create_error_object(code: JSONAPI::FILTER_NOT_ALLOWED, status: :bad_request, title: I18n.translate('jsonapi-resources.exceptions.filter_not_allowed.title', default: 'Filter not allowed'), detail: I18n.translate('jsonapi-resources.exceptions.filter_not_allowed.detail', default: "#{filter} is not allowed.", filter: filter))] end