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:
parent
9dc258d614
commit
d27dd860c7
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue