diff options
author | Rick Olson <technoweenie@gmail.com> | 2006-03-24 14:46:17 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2006-03-24 14:46:17 +0000 |
commit | 38bae0a9695aeaf200b5d62cee2dba2928c847d9 (patch) | |
tree | 9d22babe8d9ebf70e6e095a4e4e78bcb5ffb0e8a /activerecord/lib/active_record/associations/has_many_through_association.rb | |
parent | cb069ea7cc0c530b6d1a3cbd636d728568b3f041 (diff) | |
download | rails-38bae0a9695aeaf200b5d62cee2dba2928c847d9.tar.gz rails-38bae0a9695aeaf200b5d62cee2dba2928c847d9.tar.bz2 rails-38bae0a9695aeaf200b5d62cee2dba2928c847d9.zip |
Change has_many :through to use the :source option to specify the source association. :class_name is now ignored. [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4022 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/associations/has_many_through_association.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/has_many_through_association.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/has_many_through_association.rb b/activerecord/lib/active_record/associations/has_many_through_association.rb index ae34885480..104ed5ba58 100644 --- a/activerecord/lib/active_record/associations/has_many_through_association.rb +++ b/activerecord/lib/active_record/associations/has_many_through_association.rb @@ -72,7 +72,7 @@ module ActiveRecord when :belongs_to, :has_many "#{@reflection.through_reflection.table_name}.#{@reflection.through_reflection.primary_key_name} = #{@owner.quoted_id}" else - raise ActiveRecordError, "Invalid source reflection macro :#{@reflection.source_reflection.macro} for has_many #{@reflection.name}, :through => #{@reflection.through_reflection.name}" + raise ActiveRecordError, "Invalid source reflection macro :#{@reflection.source_reflection.macro} for has_many #{@reflection.name}, :through => #{@reflection.through_reflection.name}. Use :source to specify the source reflection." end end conditions << " AND (#{sql_conditions})" if sql_conditions |