diff options
Diffstat (limited to 'railties/lib/rails/generators')
18 files changed, 2 insertions, 21 deletions
diff --git a/railties/lib/rails/generators/actions.rb b/railties/lib/rails/generators/actions.rb index 1a5f2ff203..406a5b8fc7 100644 --- a/railties/lib/rails/generators/actions.rb +++ b/railties/lib/rails/generators/actions.rb @@ -268,7 +268,6 @@ module Rails end private - # Define log for backwards compatibility. If just one argument is sent, # invoke say, otherwise invoke say_status. Differently from say and # similarly to say_status, this method respects the quiet? option given. diff --git a/railties/lib/rails/generators/actions/create_migration.rb b/railties/lib/rails/generators/actions/create_migration.rb index 05bc242447..67a8139cd3 100644 --- a/railties/lib/rails/generators/actions/create_migration.rb +++ b/railties/lib/rails/generators/actions/create_migration.rb @@ -40,7 +40,6 @@ module Rails alias :exists? :existing_migration private - def on_conflict_behavior # :doc: options = base.options.merge(config) if identical? diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index 303073d867..dbfb7337f0 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -108,7 +108,6 @@ module Rails end private - def gemfile_entry(name, *args) # :doc: options = args.extract_options! version = args.first diff --git a/railties/lib/rails/generators/base.rb b/railties/lib/rails/generators/base.rb index 5523a3f659..0b91e3223e 100644 --- a/railties/lib/rails/generators/base.rb +++ b/railties/lib/rails/generators/base.rb @@ -245,7 +245,6 @@ module Rails end private - # Check whether the given class names are already taken by user # application or Ruby on Rails. def class_collisions(*class_names) diff --git a/railties/lib/rails/generators/erb.rb b/railties/lib/rails/generators/erb.rb index ba20bcd32a..aab2d634d3 100644 --- a/railties/lib/rails/generators/erb.rb +++ b/railties/lib/rails/generators/erb.rb @@ -6,7 +6,6 @@ module Erb # :nodoc: module Generators # :nodoc: class Base < Rails::Generators::NamedBase #:nodoc: private - def formats [format] end diff --git a/railties/lib/rails/generators/erb/mailer/mailer_generator.rb b/railties/lib/rails/generators/erb/mailer/mailer_generator.rb index 997602cb8c..f66be1ee44 100644 --- a/railties/lib/rails/generators/erb/mailer/mailer_generator.rb +++ b/railties/lib/rails/generators/erb/mailer/mailer_generator.rb @@ -29,7 +29,6 @@ module Erb # :nodoc: end private - def formats [:text, :html] end diff --git a/railties/lib/rails/generators/erb/scaffold/scaffold_generator.rb b/railties/lib/rails/generators/erb/scaffold/scaffold_generator.rb index 2fc04e4094..6d3bccab0b 100644 --- a/railties/lib/rails/generators/erb/scaffold/scaffold_generator.rb +++ b/railties/lib/rails/generators/erb/scaffold/scaffold_generator.rb @@ -24,7 +24,6 @@ module Erb # :nodoc: end private - def available_views %w(index edit show new _form) end diff --git a/railties/lib/rails/generators/generated_attribute.rb b/railties/lib/rails/generators/generated_attribute.rb index 1a80e71eae..4e348be9be 100644 --- a/railties/lib/rails/generators/generated_attribute.rb +++ b/railties/lib/rails/generators/generated_attribute.rb @@ -39,7 +39,6 @@ module Rails end private - # parse possible attribute options like :limit for string/text/binary/integer, :precision/:scale for decimals or :polymorphic for references/belongs_to # when declaring options curly brackets should be used def parse_type_and_options(type) diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index 7336e235f6..ea3968bf39 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -244,7 +244,6 @@ module Rails RAILS_DEV_PATH = File.expand_path("../../../../../..", __dir__) class AppGenerator < AppBase - # :stopdoc: WEBPACKS = %w( react vue angular elm stimulus ) @@ -495,10 +494,9 @@ module Rails "rails new #{arguments.map(&:usage).join(' ')} [options]" end - # :startdoc: + # :startdoc: private - # Define file as an alias to create_file for backwards compatibility. def file(*args, &block) create_file(*args, &block) @@ -543,7 +541,6 @@ module Rails end private - def handle_version_request!(argument) if ["--version", "-v"].include?(argument) require "rails/version" diff --git a/railties/lib/rails/generators/rails/controller/controller_generator.rb b/railties/lib/rails/generators/rails/controller/controller_generator.rb index eb75e7e661..88729545f3 100644 --- a/railties/lib/rails/generators/rails/controller/controller_generator.rb +++ b/railties/lib/rails/generators/rails/controller/controller_generator.rb @@ -25,7 +25,6 @@ module Rails end private - def file_name @_file_name ||= remove_possible_suffix(super) end diff --git a/railties/lib/rails/generators/rails/generator/generator_generator.rb b/railties/lib/rails/generators/rails/generator/generator_generator.rb index 747acd68d1..b0146641b4 100644 --- a/railties/lib/rails/generators/rails/generator/generator_generator.rb +++ b/railties/lib/rails/generators/rails/generator/generator_generator.rb @@ -15,7 +15,6 @@ module Rails hook_for :test_framework private - def generator_dir if options[:namespace] File.join("lib", "generators", regular_class_path, file_name) diff --git a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb index 895b3b2e92..4c18bdb430 100644 --- a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb +++ b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb @@ -269,7 +269,6 @@ task default: :test end private - def create_dummy_app(path = nil) dummy_path(path) if path diff --git a/railties/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb b/railties/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb index e1ca54ec91..b2cdeee6d1 100644 --- a/railties/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb +++ b/railties/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb @@ -34,7 +34,6 @@ module Rails end private - def permitted_params attachments, others = attributes_names.partition { |name| attachments?(name) } params = others.map { |name| ":#{name}" } diff --git a/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb.tt b/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb.tt index ff41fef9e9..a69a24e281 100644 --- a/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb.tt +++ b/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb.tt @@ -16,7 +16,7 @@ class <%= class_name %>ControllerTest < ActionDispatch::IntegrationTest get <%= url_helper_prefix %>_<%= action %>_url assert_response :success end - +<%= "\n" unless action == actions.last -%> <% end -%> <% end -%> end diff --git a/railties/lib/rails/generators/test_unit/generator/generator_generator.rb b/railties/lib/rails/generators/test_unit/generator/generator_generator.rb index 19be4f2f51..ae7e28580e 100644 --- a/railties/lib/rails/generators/test_unit/generator/generator_generator.rb +++ b/railties/lib/rails/generators/test_unit/generator/generator_generator.rb @@ -15,7 +15,6 @@ module TestUnit # :nodoc: end private - def generator_path if options[:namespace] File.join("generators", regular_class_path, file_name, "#{file_name}_generator") diff --git a/railties/lib/rails/generators/test_unit/integration/integration_generator.rb b/railties/lib/rails/generators/test_unit/integration/integration_generator.rb index ba27ed329b..86fea3f677 100644 --- a/railties/lib/rails/generators/test_unit/integration/integration_generator.rb +++ b/railties/lib/rails/generators/test_unit/integration/integration_generator.rb @@ -12,7 +12,6 @@ module TestUnit # :nodoc: end private - def file_name @_file_name ||= super.sub(/_test\z/i, "") end diff --git a/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb b/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb index 26002a0704..a4bc81cad6 100644 --- a/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +++ b/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb @@ -38,7 +38,6 @@ module TestUnit # :nodoc: end private - def attributes_string attributes_hash.map { |k, v| "#{k}: #{v}" }.join(", ") end diff --git a/railties/lib/rails/generators/testing/behaviour.rb b/railties/lib/rails/generators/testing/behaviour.rb index ec29ad12ba..a092faec89 100644 --- a/railties/lib/rails/generators/testing/behaviour.rb +++ b/railties/lib/rails/generators/testing/behaviour.rb @@ -88,7 +88,6 @@ module Rails end private - def destination_root_is_set? raise "You need to configure your Rails::Generators::TestCase destination root." unless destination_root end |