From ec44763f03b49e8c6e3bff71772ba32863a01306 Mon Sep 17 00:00:00 2001 From: Mohammad El-Abid Date: Thu, 26 May 2011 00:54:51 -0400 Subject: Removes the restriction on primary key when joining in a habtm && test that it was properly removed --- activerecord/lib/active_record/associations.rb | 6 ------ 1 file changed, 6 deletions(-) (limited to 'activerecord/lib/active_record/associations.rb') diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 1c7209e64e..a0a1ff23db 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -76,12 +76,6 @@ module ActiveRecord end end - class HasAndBelongsToManyAssociationWithPrimaryKeyError < ActiveRecordError #:nodoc: - def initialize(reflection) - super("Primary key is not allowed in a has_and_belongs_to_many join table (#{reflection.options[:join_table]}).") - end - end - class HasAndBelongsToManyAssociationForeignKeyNeeded < ActiveRecordError #:nodoc: def initialize(reflection) super("Cannot create self referential has_and_belongs_to_many association on '#{reflection.class_name rescue nil}##{reflection.name rescue nil}'. :association_foreign_key cannot be the same as the :foreign_key.") -- cgit v1.2.3