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

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -