Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #2124 from arunagw/render_partial_invalid_check_fix

Checking with to_s. As regexp fail with 1.8.7
  • Loading branch information...
commit adc7097dc0d32e68cc613ca136ff3ec06301680c 2 parents fcbde45 + d4f4626
@spastorino spastorino authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  actionpack/lib/action_view/renderer/partial_renderer.rb
View
3  actionpack/lib/action_view/renderer/partial_renderer.rb
@@ -300,8 +300,7 @@ def setup(context, options, block)
else
paths.map! { |path| retrieve_variable(path).unshift(path) }
end
-
- if String === partial && @variable !~ /^[a-z_][a-zA-Z_0-9]*$/
+ if String === partial && @variable.to_s !~ /^[a-z_][a-zA-Z_0-9]*$/
raise ArgumentError.new("The partial name (#{partial}) is not a valid Ruby identifier; " +
"make sure your partial name starts with a letter or underscore, " +
"and is followed by any combinations of letters, numbers, or underscores.")
Please sign in to comment.
Something went wrong with that request. Please try again.