Permalink
Browse files

Use sub instead of gsub

Signed-off-by: Joshua Peek <josh@joshpeek.com>
  • Loading branch information...
1 parent 9dc258d commit d27dd860c7f4f9b9e5aebe7d0c6e9b6108d8717c @tarmo tarmo committed with josh Jul 14, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_view/renderable_partial.rb
@@ -4,7 +4,7 @@ module RenderablePartial
# So you can not set or modify any instance variables
def variable_name
- @variable_name ||= name.gsub(/^_/, '').to_sym
+ @variable_name ||= name.sub(/\A_/, '').to_sym
end
def counter_name

0 comments on commit d27dd86

Please sign in to comment.