1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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
This commit is contained in:
Tobias Lütke 2007-07-09 16:19:40 +00:00
parent 3fbfc13ee3
commit 1241615692

View file

@ -483,7 +483,7 @@ module ActionView
end
def object
@object || @template_object.instance_variable_get("@#{@object_name}")
@object || (@template_object.instance_variable_get("@#{@object_name}") rescue nil)
end
def value(object)