aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorRichard Schneeman <richard.schneeman+no-recruiters@gmail.com>2018-08-21 06:57:04 -0700
committerGitHub <noreply@github.com>2018-08-21 06:57:04 -0700
commit27934451b2f3f84770ac165e63a624fe075b0785 (patch)
treef24ac87dba824f7e6b0a8c156633adf48f55a98b /railties/lib
parent2b594b061f34094175fd3efeeb1cd5d245cbabe3 (diff)
parent41ad613e4c5d6c05f20ac0437564ff0d31ab9f5a (diff)
downloadrails-27934451b2f3f84770ac165e63a624fe075b0785.tar.gz
rails-27934451b2f3f84770ac165e63a624fe075b0785.tar.bz2
rails-27934451b2f3f84770ac165e63a624fe075b0785.zip
Merge pull request #33660 from y-yagi/follow_up_32121
Make `rake routes` deprecate before deleting
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/tasks.rb1
-rw-r--r--railties/lib/rails/tasks/routes.rake9
2 files changed, 10 insertions, 0 deletions
diff --git a/railties/lib/rails/tasks.rb b/railties/lib/rails/tasks.rb
index 56f2eba312..2f644a20c9 100644
--- a/railties/lib/rails/tasks.rb
+++ b/railties/lib/rails/tasks.rb
@@ -12,6 +12,7 @@ require "rake"
middleware
misc
restart
+ routes
tmp
yarn
).tap { |arr|
diff --git a/railties/lib/rails/tasks/routes.rake b/railties/lib/rails/tasks/routes.rake
new file mode 100644
index 0000000000..21ce900a8c
--- /dev/null
+++ b/railties/lib/rails/tasks/routes.rake
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+require "rails/command"
+require "active_support/deprecation"
+
+task routes: :environment do
+ ActiveSupport::Deprecation.warn("Using `bin/rake routes` is deprecated and will be removed in Rails 6.1. Use `bin/rails routes` instead.\n")
+ Rails::Command.invoke "routes"
+end