aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2018-08-15 20:00:34 +0200
committerGitHub <noreply@github.com>2018-08-15 20:00:34 +0200
commitefaa7191f24da079e785b00019a9ef252f841a8c (patch)
treeab36e5f26171cac8c3d7e79e16b4eb01c168f443 /railties/lib/rails/commands
parentd25e65a514574c71e31d6dc6d01589addc2b0170 (diff)
parent35a70f84225537f0bdba46d9d0bacea0a7d764e8 (diff)
downloadrails-efaa7191f24da079e785b00019a9ef252f841a8c.tar.gz
rails-efaa7191f24da079e785b00019a9ef252f841a8c.tar.bz2
rails-efaa7191f24da079e785b00019a9ef252f841a8c.zip
Merge pull request #33559 from anniecodes/dev-task
Move `dev:cache` rake task to use Rails::Command
Diffstat (limited to 'railties/lib/rails/commands')
-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