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, 6 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/resource_helpers.rb b/railties/lib/rails/generators/resource_helpers.rb index 6d80003271..e7cb722473 100644 --- a/railties/lib/rails/generators/resource_helpers.rb +++ b/railties/lib/rails/generators/resource_helpers.rb @@ -23,10 +23,14 @@ module Rails          assign_controller_names!(controller_name.pluralize)        end +      # TODO Change this to private once we've dropped Ruby 2.2 support. +      # Workaround for Ruby 2.2 "private attribute?" warning.        protected          attr_reader :controller_name, :controller_file_name +      private +          def controller_class_path            if options[:model_name]              @controller_class_path @@ -55,7 +59,7 @@ module Rails          end          # Loads the ORM::Generators::ActiveModel class. This class is responsible -        # to tell scaffold entities how to generate an specific method for the +        # to tell scaffold entities how to generate a specific method for the          # ORM. Check Rails::Generators::ActiveModel for more information.          def orm_class            @orm_class ||= begin @@ -73,7 +77,7 @@ module Rails          end          # Initialize ORM::Generators::ActiveModel to access instance methods. -        def orm_instance(name=singular_table_name) +        def orm_instance(name = singular_table_name)            @orm_instance ||= orm_class.new(name)          end      end  | 
