From 2d8396fc9fbea9189e9e945e41e643925da5b2cb Mon Sep 17 00:00:00 2001 From: Jurriaan Pruis Date: Tue, 3 Apr 2012 15:16:09 +0200 Subject: Updated/changed useless tr/gsubs --- railties/lib/rails/generators/named_base.rb | 2 +- railties/lib/rails/generators/resource_helpers.rb | 2 +- railties/lib/rails/railtie.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'railties/lib/rails') diff --git a/railties/lib/rails/generators/named_base.rb b/railties/lib/rails/generators/named_base.rb index 862fd9e88d..c457b5fbbc 100644 --- a/railties/lib/rails/generators/named_base.rb +++ b/railties/lib/rails/generators/named_base.rb @@ -99,7 +99,7 @@ module Rails end def i18n_scope - @i18n_scope ||= file_path.gsub('/', '.') + @i18n_scope ||= file_path.tr('/', '.') end def table_name diff --git a/railties/lib/rails/generators/resource_helpers.rb b/railties/lib/rails/generators/resource_helpers.rb index 3c5b39fa16..48833869e5 100644 --- a/railties/lib/rails/generators/resource_helpers.rb +++ b/railties/lib/rails/generators/resource_helpers.rb @@ -50,7 +50,7 @@ module Rails end def controller_i18n_scope - @controller_i18n_scope ||= controller_file_path.gsub('/', '.') + @controller_i18n_scope ||= controller_file_path.tr('/', '.') end # Loads the ORM::Generators::ActiveModel class. This class is responsible diff --git a/railties/lib/rails/railtie.rb b/railties/lib/rails/railtie.rb index e8563f4daf..dc5de4084e 100644 --- a/railties/lib/rails/railtie.rb +++ b/railties/lib/rails/railtie.rb @@ -162,7 +162,7 @@ module Rails protected def generate_railtie_name(class_or_module) - ActiveSupport::Inflector.underscore(class_or_module).gsub("/", "_") + ActiveSupport::Inflector.underscore(class_or_module).tr("/", "_") end end -- cgit v1.2.3