Exception: ActiveRecord::HasManyThroughCantDissociateNewRecords
- Inherits:
-
ActiveRecordError
- Object
- StandardError
- ActiveRecordError
- ActiveRecord::HasManyThroughCantDissociateNewRecords
- Defined in:
- lib/active_record/associations.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(owner, reflection) ⇒ HasManyThroughCantDissociateNewRecords
constructor
A new instance of HasManyThroughCantDissociateNewRecords.
Constructor Details
#initialize(owner, reflection) ⇒ HasManyThroughCantDissociateNewRecords
Returns a new instance of HasManyThroughCantDissociateNewRecords.
71 72 73 |
# File 'lib/active_record/associations.rb', line 71 def initialize(owner, reflection) super("Cannot dissociate new records through '#{owner.class.name}##{reflection.name}' on '#{reflection.source_reflection.class_name rescue nil}##{reflection.source_reflection.name rescue nil}'. Both records must have an id in order to delete the has_many :through record associating them.") end |