class FunWithJsonApi::Exceptions::RelationshipMethodNotSupported

Constants

EXCEPTION_CODE

Public Class Methods

new(message, payload = ExceptionPayload.new) click to toggle source
Calls superclass method FunWithJsonApi::Exception::new
# File lib/fun_with_json_api/exceptions/relationship_method_not_supported.rb, line 6
def initialize(message, payload = ExceptionPayload.new)
  payload = Array.wrap(payload).each do |unsupported|
    unsupported.code ||= EXCEPTION_CODE
    unsupported.title ||= I18n.t(EXCEPTION_CODE, scope: 'fun_with_json_api.exceptions')
    unsupported.status ||= '403'
  end
  super
end