Skip to content
This repository
Browse code

Formally deprecate rich associations. [Koz]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4680 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 6ba4f4c524f73db062016701c9f93c70b08d93c0 1 parent 196fab9
Michael Koziarski NZKoz authored
2  activerecord/CHANGELOG
... ... @@ -1,5 +1,7 @@
1 1 *SVN*
2 2
  3 +* Formally deprecate rich associations. [Koz]
  4 +
3 5 * Fixed that default timezones for new / initialize should uphold utc setting #5709 [daniluk@yahoo.com]
4 6
5 7 * Fix announcement of very long migration names. #5722 [blake@near-time.com]
5 activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
@@ -67,7 +67,9 @@ def find(*args)
67 67 @reflection.klass.find(*args)
68 68 end
69 69 end
70   -
  70 +
  71 + # Deprecated as of Rails 1.2. If your associations require attributes
  72 + # you should be using has_many :through
71 73 def push_with_attributes(record, join_attributes = {})
72 74 raise_on_type_mismatch(record)
73 75 join_attributes.each { |key, value| record[key.to_s] = value }
@@ -79,6 +81,7 @@ def push_with_attributes(record, join_attributes = {})
79 81
80 82 self
81 83 end
  84 + deprecate :push_with_attributes
82 85
83 86 alias :concat_with_attributes :push_with_attributes
84 87

0 comments on commit 6ba4f4c

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