From 6ba4f4c524f73db062016701c9f93c70b08d93c0 Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Sat, 5 Aug 2006 22:35:58 +0000 Subject: Formally deprecate rich associations. [Koz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4680 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/CHANGELOG | 2 ++ .../associations/has_and_belongs_to_many_association.rb | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'activerecord') diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index 614cb2a1c0..6cc7c245d5 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Formally deprecate rich associations. [Koz] + * Fixed that default timezones for new / initialize should uphold utc setting #5709 [daniluk@yahoo.com] * Fix announcement of very long migration names. #5722 [blake@near-time.com] 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 -- cgit v1.2.3