aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/tasks')
-rw-r--r--railties/lib/rails/tasks/initializers.rake10
1 files changed, 6 insertions, 4 deletions
diff --git a/railties/lib/rails/tasks/initializers.rake b/railties/lib/rails/tasks/initializers.rake
index ae85cb0f86..7ccf7455bb 100644
--- a/railties/lib/rails/tasks/initializers.rake
+++ b/railties/lib/rails/tasks/initializers.rake
@@ -1,8 +1,10 @@
# frozen_string_literal: true
+require "rails/command"
+require "active_support/deprecation"
+
desc "Print out all defined initializers in the order they are invoked by Rails."
-task initializers: :environment do
- Rails.application.initializers.tsort_each do |initializer|
- puts "#{initializer.context_class}.#{initializer.name}"
- end
+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"
end