diff options
Diffstat (limited to 'railties/lib/rails/generators/resource_helpers.rb')
-rw-r--r-- | railties/lib/rails/generators/resource_helpers.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/railties/lib/rails/generators/resource_helpers.rb b/railties/lib/rails/generators/resource_helpers.rb index 3c5b39fa16..7fd5c00768 100644 --- a/railties/lib/rails/generators/resource_helpers.rb +++ b/railties/lib/rails/generators/resource_helpers.rb @@ -4,16 +4,14 @@ module Rails module Generators # Deal with controller names on scaffold and add some helpers to deal with # ActiveModel. - # - module ResourceHelpers + module ResourceHelpers # :nodoc: mattr_accessor :skip_warn def self.included(base) #:nodoc: - base.class_option :force_plural, :type => :boolean, :desc => "Forces the use of a plural ModelName" + base.class_option :force_plural, type: :boolean, desc: "Forces the use of a plural ModelName" end # Set controller variables on initialization. - # def initialize(*args) #:nodoc: super @@ -50,7 +48,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 |