aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/tasks/dev.rake
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/tasks/dev.rake')
-rw-r--r--railties/lib/rails/tasks/dev.rake14
1 files changed, 3 insertions, 11 deletions
diff --git a/railties/lib/rails/tasks/dev.rake b/railties/lib/rails/tasks/dev.rake
index ff2de264ce..d2ceaacc0c 100644
--- a/railties/lib/rails/tasks/dev.rake
+++ b/railties/lib/rails/tasks/dev.rake
@@ -1,16 +1,8 @@
+require 'rails/dev_caching'
+
namespace :dev do
desc 'Toggle development mode caching on/off'
task :cache do
- FileUtils.mkdir_p('tmp')
-
- if File.exist? 'tmp/caching-dev.txt'
- File.delete 'tmp/caching-dev.txt'
- puts 'Development mode is no longer being cached.'
- else
- FileUtils.touch 'tmp/caching-dev.txt'
- puts 'Development mode is now being cached.'
- end
-
- FileUtils.touch 'tmp/restart.txt'
+ Rails::DevCaching.enable_by_file
end
end