class Caprese::RecordNotFoundError
Thrown when a record could not be found
@param [Symbol] field the field that we searched with @param [String] model the name of the model we searched for a record of @param [Value] value the value we searched for a match with
Public Class Methods
new(model: nil, value: nil)
click to toggle source
Calls superclass method
Caprese::Error::new
# File lib/caprese/errors.rb, line 43 def initialize(model: nil, value: nil) super field: :id, code: :not_found, t: { model: model, value: value } @header = { status: :not_found } end
Public Instance Methods
full_message()
click to toggle source
# File lib/caprese/errors.rb, line 48 def full_message I18n.t("#{i18n_scope}.parameters.not_found", t) end