Exception: ACH::Component::HasManyAssociation::NoLinkError

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/ach/component/has_many_association.rb

Overview

If Record should be attached to (preceded by) other Record, this exception is raised on attempt to create attachment record without having preceded record. For example, Addenda records should be created after Entry records. Each new Addenda record will be attached to the latest Entry record.

Instance Method Summary collapse

Constructor Details

#initialize(link, klass) ⇒ NoLinkError

Initialize the error with a descriptive message.

Parameters:

  • link (String)
  • klass (Class)


32
33
34
# File 'lib/ach/component/has_many_association.rb', line 32

def initialize(link, klass)
  super "No #{link} was found to attach a new #{klass}"
end