Sha256: 3c88d90fd4f42556c9a12338c78b9b5ab128a3a57aaeb4e8687338ac0a11dbc5

Contents?: true

Size: 583 Bytes

Versions: 3

Compression:

Stored size: 583 Bytes

Contents

require 'rails/command'

module Rails
  module Commands
    # This is a wrapper around the Rails dev:cache command
    class DevCache < Command
      set_banner :dev_cache, 'Toggle development mode caching on/off'
      def dev_cache
        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'
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
railties-5.0.0.beta2 lib/rails/commands/dev_cache.rb
railties-5.0.0.beta1.1 lib/rails/commands/dev_cache.rb
railties-5.0.0.beta1 lib/rails/commands/dev_cache.rb