diff options
author | Tarmo Tänav <tarmo@itech.ee> | 2008-07-14 18:02:59 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-07-14 18:02:59 -0500 |
commit | d27dd860c7f4f9b9e5aebe7d0c6e9b6108d8717c (patch) | |
tree | dd1dd1e9ec8523099ad6f984d8ec409fcf187012 /actionpack | |
parent | 9dc258d6147c8dab772d1f041098a38389cd3e73 (diff) | |
download | rails-d27dd860c7f4f9b9e5aebe7d0c6e9b6108d8717c.tar.gz rails-d27dd860c7f4f9b9e5aebe7d0c6e9b6108d8717c.tar.bz2 rails-d27dd860c7f4f9b9e5aebe7d0c6e9b6108d8717c.zip |
Use sub instead of gsub
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/renderable_partial.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/renderable_partial.rb b/actionpack/lib/action_view/renderable_partial.rb index 250b4e1624..7b51eccc27 100644 --- a/actionpack/lib/action_view/renderable_partial.rb +++ b/actionpack/lib/action_view/renderable_partial.rb @@ -4,7 +4,7 @@ module ActionView # 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 |