Skip to content
Browse files

rename session store

  • Loading branch information...
1 parent 8b32726 commit a5ad31cff960d2ee32c3b69374143520b4d2f3cb @thousandsofthem committed Nov 16, 2012
Showing with 8 additions and 4 deletions.
  1. +1 −1 README.md
  2. +2 −2 lib/action_dispatch/session/{iron_cache_store.rb → iron_cache.rb}
  3. +5 −1 lib/iron_cache.rb
View
2 README.md
@@ -82,7 +82,7 @@ AppName::Application.config.session_store :iron_cache_store
Alternatively, you can supply project_id and token in code.
```ruby
-AppName::Application.config.session_store :iron_cache_store,
+AppName::Application.config.session_store :iron_cache,
project_id: 'XXX',
token: 'YYY',
namespace: 'other-cache-name',
View
4 ...tion_dispatch/session/iron_cache_store.rb → lib/action_dispatch/session/iron_cache.rb
@@ -4,13 +4,13 @@
module ActionDispatch
module Session
- class IronCacheStore < ActionDispatch::Session::AbstractStore
+ class IronCache < ActionDispatch::Session::AbstractStore
def initialize(app, options = {})
@options = options
super
- @client = IronCache::Client.new(options)
+ @client = ::IronCache::Client.new(options)
end
def options
View
6 lib/iron_cache.rb
@@ -3,4 +3,8 @@
require_relative 'iron_cache/caches'
require_relative 'iron_cache/items'
require_relative 'iron_cache/client'
-require_relative 'action_dispatch/session/iron_cache_store'
+
+# session store
+if defined? ActionDispatch
+ require_relative 'action_dispatch/session/iron_cache'
+end

0 comments on commit a5ad31c

Please sign in to comment.
Something went wrong with that request. Please try again.