Skip to content
Browse files

Formally deprecate rich associations. [Koz]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4680 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 196fab9 commit 6ba4f4c524f73db062016701c9f93c70b08d93c0 @NZKoz NZKoz committed Aug 5, 2006
View
2 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]
View
5 activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
@@ -67,7 +67,9 @@ def find(*args)
@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 @@ def push_with_attributes(record, join_attributes = {})
self
end
+ deprecate :push_with_attributes
alias :concat_with_attributes :push_with_attributes

0 comments on commit 6ba4f4c

Please sign in to comment.
Something went wrong with that request. Please try again.