提交 12416156 编写于 作者: T Tobias Lütke

Don't blow up when using nested fields_for and the source object is nil


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7168 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 3fbfc13e
...@@ -483,7 +483,7 @@ def to_content_tag(tag_name, options = {}) ...@@ -483,7 +483,7 @@ def to_content_tag(tag_name, options = {})
end end
def object def object
@object || @template_object.instance_variable_get("@#{@object_name}") @object || (@template_object.instance_variable_get("@#{@object_name}") rescue nil)
end end
def value(object) def value(object)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册