Class: SolidCache::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/solid_cache/install/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#configure_cache_store_adapterObject



11
12
13
14
# File 'lib/generators/solid_cache/install/install_generator.rb', line 11

def configure_cache_store_adapter
  gsub_file Pathname.new(destination_root).join("config/environments/production.rb"),
    /(# )?config\.cache_store = (:.*)/, "config.cache_store = :solid_cache_store"
end

#copy_filesObject



6
7
8
9
# File 'lib/generators/solid_cache/install/install_generator.rb', line 6

def copy_files
  template "config/cache.yml"
  template "db/cache_schema.rb"
end