module CleanErrors

Constants

VERSION
ValidationError

Public Class Methods

Error(type, i18n_data={})
Alias for: ValidationError
ValidationError(type, i18n_data={}) click to toggle source
# File lib/clean_errors.rb, line 9
def ValidationError(type, i18n_data={})
  CleanErrors::ValidationError.new(
    type: type,
    message: I18n.t("#{translation_path}.#{type}") % i18n_data
  )
end
Also aliased as: Error
translation_path() click to toggle source
# File lib/clean_errors.rb, line 17
def translation_path
  @path || "errors"
end
translation_path=(value) click to toggle source
# File lib/clean_errors.rb, line 21
def translation_path= value
  @path = value
end