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:
parent
3fbfc13ee3
commit
1241615692
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue