diff options
-rw-r--r-- | actionpack/lib/abstract_controller/base.rb | 5 | ||||
-rw-r--r-- | guides/source/upgrading_ruby_on_rails.md | 7 | ||||
-rw-r--r-- | railties/lib/rails/commands/dev/dev_command.rb | 5 | ||||
-rw-r--r-- | railties/lib/rails/commands/initializers/initializers_command.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/tasks/initializers.rake | 1 |
5 files changed, 16 insertions, 4 deletions
diff --git a/actionpack/lib/abstract_controller/base.rb b/actionpack/lib/abstract_controller/base.rb index a312af6715..9783c19835 100644 --- a/actionpack/lib/abstract_controller/base.rb +++ b/actionpack/lib/abstract_controller/base.rb @@ -78,7 +78,10 @@ module AbstractController # Except for public instance methods of Base and its ancestors internal_methods + # Be sure to include shadowed public instance methods of this class - public_instance_methods(false)).uniq.map(&:to_s) + public_instance_methods(false)) + + methods.uniq! + methods.map!(&:to_s) methods.to_set end diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md index 319bc09be3..89de180508 100644 --- a/guides/source/upgrading_ruby_on_rails.md +++ b/guides/source/upgrading_ruby_on_rails.md @@ -66,6 +66,13 @@ Overwrite /myapp/config/application.rb? (enter "h" for help) [Ynaqdh] Don't forget to review the difference, to see if there were any unexpected changes. +### Configure Framework Defaults + +The new Rails version might have different configuration defaults than the previous version. However, after following the steps described above, your application would still run with configuration defaults from the *previous* Rails version. That's because the value for `config.load_defaults` in `config/application.rb` has not been changed yet. + +To allow you to upgrade to new defaults one by one, the update task has created a file `config/initializers/new_framework_defaults.rb`. Once your application is ready to run with new defaults, you can remove this file and flip the `config.load_defaults` value. + + Upgrading from Rails 5.2 to Rails 6.0 ------------------------------------- diff --git a/railties/lib/rails/commands/dev/dev_command.rb b/railties/lib/rails/commands/dev/dev_command.rb index 820dc4db9e..a3f02f3172 100644 --- a/railties/lib/rails/commands/dev/dev_command.rb +++ b/railties/lib/rails/commands/dev/dev_command.rb @@ -5,7 +5,10 @@ require "rails/dev_caching" module Rails module Command class DevCommand < Base # :nodoc: - desc "Toggle development mode caching on/off" + def help + say "rails dev:cache # Toggle development mode caching on/off." + end + def cache Rails::DevCaching.enable_by_file end diff --git a/railties/lib/rails/commands/initializers/initializers_command.rb b/railties/lib/rails/commands/initializers/initializers_command.rb index 559546acea..33596177af 100644 --- a/railties/lib/rails/commands/initializers/initializers_command.rb +++ b/railties/lib/rails/commands/initializers/initializers_command.rb @@ -3,7 +3,7 @@ module Rails module Command class InitializersCommand < Base # :nodoc: - desc "Print out all defined initializers in the order they are invoked by Rails." + desc "initializers", "Print out all defined initializers in the order they are invoked by Rails." def perform require_application_and_environment! diff --git a/railties/lib/rails/tasks/initializers.rake b/railties/lib/rails/tasks/initializers.rake index 7ccf7455bb..1fa8ca4f51 100644 --- a/railties/lib/rails/tasks/initializers.rake +++ b/railties/lib/rails/tasks/initializers.rake @@ -3,7 +3,6 @@ require "rails/command" require "active_support/deprecation" -desc "Print out all defined initializers in the order they are invoked by Rails." task :initializers do ActiveSupport::Deprecation.warn("Using `bin/rake initializers` is deprecated and will be removed in Rails 6.1. Use `bin/rails initializers` instead.\n") Rails::Command.invoke "initializers" |