Permalink
Browse files

Added railtie to set config.cache_store.

This addresses rails/rails#6296
  • Loading branch information...
1 parent 157975f commit 5f9c3bfd79dec609208aa01f05bc6dc44d4feeda @steveklabnik committed May 17, 2012
Showing with 8 additions and 0 deletions.
  1. +1 −0 lib/dalli.rb
  2. +7 −0 lib/dalli/railtie.rb
View
1 lib/dalli.rb
@@ -4,6 +4,7 @@
require 'dalli/socket'
require 'dalli/version'
require 'dalli/options'
+require 'dalli/railtie' if defined?(Rails)
module Dalli
# generic error
View
7 lib/dalli/railtie.rb
@@ -0,0 +1,7 @@
+module Dalli
+ class Railtie < ::Rails::Railtie
+ config.before_configuration do
+ config.cache_store = :dalli_store
+ end
+ end
+end

0 comments on commit 5f9c3bf

Please sign in to comment.