aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2006-08-05 22:35:58 +0000
committerMichael Koziarski <michael@koziarski.com>2006-08-05 22:35:58 +0000
commit6ba4f4c524f73db062016701c9f93c70b08d93c0 (patch)
tree3aed4ba05b8a673ee7bb08605cd2f93eee12b9cc /activerecord/lib
parent196fab9b0dcbdc83e27241678ebb2557ca4e030e (diff)
downloadrails-6ba4f4c524f73db062016701c9f93c70b08d93c0.tar.gz
rails-6ba4f4c524f73db062016701c9f93c70b08d93c0.tar.bz2
rails-6ba4f4c524f73db062016701c9f93c70b08d93c0.zip
Formally deprecate rich associations. [Koz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4680 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb b/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
index 42cf549dcb..fc1de92259 100644
--- a/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
+++ b/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
@@ -67,7 +67,9 @@ module ActiveRecord
@reflection.klass.find(*args)
end
end
-
+
+ # Deprecated as of Rails 1.2. If your associations require attributes
+ # you should be using has_many :through
def push_with_attributes(record, join_attributes = {})
raise_on_type_mismatch(record)
join_attributes.each { |key, value| record[key.to_s] = value }
@@ -79,6 +81,7 @@ module ActiveRecord
self
end
+ deprecate :push_with_attributes
alias :concat_with_attributes :push_with_attributes