method
new
v5.0.0.1 -
Show latest stable
-
0 notes -
Class: ActiveRecord::HasManyThroughCantDissociateNewRecords
new(owner = nil, reflection = nil)
public
Hide source
# File activerecord/lib/active_record/associations.rb, line 127 def initialize(owner = nil, reflection = nil) if 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.") else super("Cannot dissociate new records.") end end