aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activerecord/CHANGELOG2
-rw-r--r--activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb5
2 files changed, 6 insertions, 1 deletions
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