Class: ActionController::Session::DatamapperStore
- Inherits:
-
AbstractStore
- Object
- AbstractStore
- ActionController::Session::DatamapperStore
- Defined in:
- lib/datamapper4rails/datamapper_store.rb
Constant Summary collapse
- SecureRandom =
if defined?(::SecureRandom) # Use Ruby's SecureRandom library if available. ::SecureRandom else # try if there is active support around ;-) require 'active_support' ::ActiveSupport::SecureRandom end
Instance Method Summary collapse
-
#initialize(app, options = {}) ⇒ DatamapperStore
constructor
A new instance of DatamapperStore.
Constructor Details
#initialize(app, options = {}) ⇒ DatamapperStore
Returns a new instance of DatamapperStore.
21 22 23 24 25 26 27 28 29 |
# File 'lib/datamapper4rails/datamapper_store.rb', line 21 def initialize(app, = {}) super id_generator = Proc.new do SecureRandom.hex(16) end @store = ::DataMapper::Session::Abstract::Store.new(app, , id_generator) @options = end |