Exception: ActiveRecord::Bixformer::ImportError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/activerecord-bixformer/error.rb

Direct Known Subclasses

DataInvalid

Instance Method Summary collapse

Constructor Details

#initialize(attribute, value, type) ⇒ ImportError

Returns a new instance of ImportError.



4
5
6
7
8
9
10
11
12
# File 'lib/activerecord-bixformer/error.rb', line 4

def initialize(attribute, value, type)
  options = {
    default: "%{attribute} %{message}",
    attribute: attribute.model.translate(attribute.name),
    message: generate_message(attribute, type, value)
  }

  super(I18n.t(:"errors.format", options))
end