aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorAnnie-Claude Côté <hello@annie.codes>2018-08-08 13:28:37 -0400
committerAnnie-Claude Côté <hello@annie.codes>2018-08-13 11:27:01 -0400
commit3e6d03d99e47e3b567e7409d8def3feea36a0c47 (patch)
tree390be79a750d985d68cca4343940a750199bad62 /railties/lib
parent7db360acb2efa64af5fbfb82036588cf7a0f20fa (diff)
downloadrails-3e6d03d99e47e3b567e7409d8def3feea36a0c47.tar.gz
rails-3e6d03d99e47e3b567e7409d8def3feea36a0c47.tar.bz2
rails-3e6d03d99e47e3b567e7409d8def3feea36a0c47.zip
Adds Rails:Command for `dev:cache` that has the same behaviour as the rake task
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/commands/dev/dev_command.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/railties/lib/rails/commands/dev/dev_command.rb b/railties/lib/rails/commands/dev/dev_command.rb
new file mode 100644
index 0000000000..820dc4db9e
--- /dev/null
+++ b/railties/lib/rails/commands/dev/dev_command.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+require "rails/dev_caching"
+
+module Rails
+ module Command
+ class DevCommand < Base # :nodoc:
+ desc "Toggle development mode caching on/off"
+ def cache
+ Rails::DevCaching.enable_by_file
+ end
+ end
+ end
+end