1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Use sub instead of gsub

Signed-off-by: Joshua Peek <josh@joshpeek.com>
This commit is contained in:
Tarmo Tänav 2008-07-14 18:02:59 -05:00 committed by Joshua Peek
parent 9dc258d614
commit d27dd860c7

View file

@ -4,7 +4,7 @@ module ActionView
# So you can not set or modify any instance variables # So you can not set or modify any instance variables
def variable_name def variable_name
@variable_name ||= name.gsub(/^_/, '').to_sym @variable_name ||= name.sub(/\A_/, '').to_sym
end end
def counter_name def counter_name