From dfab28b2ca28b477f83befbba639adb6d15c8ce0 Mon Sep 17 00:00:00 2001 From: Tieg Zaharia Date: Mon, 16 Apr 2012 13:53:51 -0400 Subject: catch nil.to_sym errors in partial_renderer, and raise ArgumentError instead --- actionpack/lib/action_view/renderer/partial_renderer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_view/renderer/partial_renderer.rb b/actionpack/lib/action_view/renderer/partial_renderer.rb index 8b53867aea..4d57a8f033 100644 --- a/actionpack/lib/action_view/renderer/partial_renderer.rb +++ b/actionpack/lib/action_view/renderer/partial_renderer.rb @@ -451,7 +451,7 @@ module ActionView end def retrieve_variable(path) - variable = @options[:as].try(:to_sym) || path[%r'_?(\w+)(\.\w+)*$', 1].to_sym + variable = @options[:as].try(:to_sym) || path[%r'_?(\w+)(\.\w+)*$', 1].try(:to_sym) variable_counter = :"#{variable}_counter" if @collection [variable, variable_counter] end -- cgit v1.2.3