aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index b003b69bb1..22d2984adb 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -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)