diff options
author | Tieg Zaharia <tieg@kickstarter.com> | 2012-04-16 13:53:51 -0400 |
---|---|---|
committer | Tieg Zaharia <tieg@kickstarter.com> | 2012-04-16 13:56:32 -0400 |
commit | dfab28b2ca28b477f83befbba639adb6d15c8ce0 (patch) | |
tree | 7f5b05a27f132b600326c19403c87b48aa9cc881 /actionpack/lib/action_view/renderer | |
parent | a0c2cfdc51e16fc39c1d3b1e78bdd257188fa04e (diff) | |
download | rails-dfab28b2ca28b477f83befbba639adb6d15c8ce0.tar.gz rails-dfab28b2ca28b477f83befbba639adb6d15c8ce0.tar.bz2 rails-dfab28b2ca28b477f83befbba639adb6d15c8ce0.zip |
catch nil.to_sym errors in partial_renderer, and raise ArgumentError instead
Diffstat (limited to 'actionpack/lib/action_view/renderer')
-rw-r--r-- | actionpack/lib/action_view/renderer/partial_renderer.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |