Exception: Secretary::NoAssociationError
- Inherits:
-
StandardError
- Object
- StandardError
- Secretary::NoAssociationError
- Defined in:
- lib/secretary/errors.rb
Instance Method Summary collapse
-
#initialize(name = nil, klass = nil) ⇒ NoAssociationError
constructor
A new instance of NoAssociationError.
- #message ⇒ Object
Constructor Details
#initialize(name = nil, klass = nil) ⇒ NoAssociationError
Returns a new instance of NoAssociationError.
15 16 17 18 |
# File 'lib/secretary/errors.rb', line 15 def initialize(name=nil, klass=nil) @name = name @klass = klass end |
Instance Method Details
#message ⇒ Object
20 21 22 23 24 |
# File 'lib/secretary/errors.rb', line 20 def "There is no association named #{@name} for the class #{@klass}. " \ "Check that you've already declared the association before calling " \ "'tracks_association', and that you use symbols." end |