From 3e6d03d99e47e3b567e7409d8def3feea36a0c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Annie-Claude=20C=C3=B4t=C3=A9?= Date: Wed, 8 Aug 2018 13:28:37 -0400 Subject: Adds Rails:Command for `dev:cache` that has the same behaviour as the rake task --- railties/lib/rails/commands/dev/dev_command.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 railties/lib/rails/commands/dev/dev_command.rb (limited to 'railties/lib') 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 -- cgit v1.2.3