ruby - Using Rack::Session::Datamapper -
Mkristgan's gem says that it can be used in a specific environment, namely rack :: session :: datamap
. Unfortunately, I do not know enough about Ruby to complete this task - the modules / classes in Ruby are still above my head (coming from PHP).
Can Rack :: Session :: provide a support in using rack_datamapper to implement datamap?
You probably do not want to do this anyway.
The answers given below are very good, but on closer consideration, I realized that I should not do this anyway, instead, I use the User ID, IP and First name in the cookie ( For convenience) and keeping it safe.
should help:
Just add to Sinatra:
Usage rack :: Session :: Moneta, Store: Monta. New (Datamapar, Setup: (NNV) ['DATABASE_URL']] "sqlite: // # {Dir.pwd} /development.db"))
and sessions [ ]
will use the object.
Comments
Post a Comment