提交 6ba4f4c5 编写于 作者: M Michael Koziarski

Formally deprecate rich associations. [Koz]


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4680 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 196fab9b
*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]
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册