aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/tasks
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2018-08-20 07:26:25 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2018-08-20 08:47:29 +0900
commit41ad613e4c5d6c05f20ac0437564ff0d31ab9f5a (patch)
tree08dc85bf6a5f9cd21b165a0f25299a54da01c325 /railties/lib/rails/tasks
parent2247077b0bed3423c8b1a9529d2cb89482f0019c (diff)
downloadrails-41ad613e4c5d6c05f20ac0437564ff0d31ab9f5a.tar.gz
rails-41ad613e4c5d6c05f20ac0437564ff0d31ab9f5a.tar.bz2
rails-41ad613e4c5d6c05f20ac0437564ff0d31ab9f5a.zip
Make `rake routes` deprecate before deleting
`rake routes` was a public task. Therefore, I think that we should deprecate it before deleting it. Related to #32121.
Diffstat (limited to 'railties/lib/rails/tasks')
-rw-r--r--railties/lib/rails/tasks/routes.rake9
1 files changed, 9 insertions, 0 deletions
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