aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/tasks
diff options
context:
space:
mode:
authorAnnie-Claude Côté <hello@annie.codes>2018-08-08 14:01:23 -0400
committerAnnie-Claude Côté <hello@annie.codes>2018-08-13 11:27:01 -0400
commit35a70f84225537f0bdba46d9d0bacea0a7d764e8 (patch)
tree489f1f0552fa811a72a1623ed272b769b9659939 /railties/lib/rails/tasks
parent3e6d03d99e47e3b567e7409d8def3feea36a0c47 (diff)
downloadrails-35a70f84225537f0bdba46d9d0bacea0a7d764e8.tar.gz
rails-35a70f84225537f0bdba46d9d0bacea0a7d764e8.tar.bz2
rails-35a70f84225537f0bdba46d9d0bacea0a7d764e8.zip
Have `bin:rake dev:cache` use the Dev Rails Command under the hood
* Call the Rails::Command::DevCommand in the rake task for dev:cache * Add deprecation for using `bin/rake` in favor of `bin/rails`
Diffstat (limited to 'railties/lib/rails/tasks')
-rw-r--r--railties/lib/rails/tasks/dev.rake6
1 files changed, 4 insertions, 2 deletions
diff --git a/railties/lib/rails/tasks/dev.rake b/railties/lib/rails/tasks/dev.rake
index 5aea6f7dc5..5a765bdd21 100644
--- a/railties/lib/rails/tasks/dev.rake
+++ b/railties/lib/rails/tasks/dev.rake
@@ -1,10 +1,12 @@
# frozen_string_literal: true
-require "rails/dev_caching"
+require "rails/command"
+require "active_support/deprecation"
namespace :dev do
desc "Toggle development mode caching on/off"
task :cache do
- Rails::DevCaching.enable_by_file
+ ActiveSupport::Deprecation.warn("Using `bin/rake dev:cache` is deprecated and will be removed in Rails 6.1. Use `bin/rails dev:cache` instead.\n")
+ Rails::Command.invoke "dev:cache"
end
end