class Caprese::AssociationNotFoundError

Thrown when an association was not found when calling `record.association()`

@param [String] name the name of the association

Public Class Methods

new(name) click to toggle source
Calls superclass method Caprese::Error::new
# File lib/caprese/errors.rb, line 57
def initialize(name)
  super field: :name, code: :not_found, t: { model: 'relationship', value: name }
  @header = { status: :not_found }
end

Public Instance Methods

full_message() click to toggle source
# File lib/caprese/errors.rb, line 62
def full_message
  I18n.t("#{i18n_scope}.parameters.not_found", t)
end