Skip to content

Instantly share code, notes, and snippets.

Created January 28, 2009 02:24
Show Gist options
  • Save anonymous/53780 to your computer and use it in GitHub Desktop.
Save anonymous/53780 to your computer and use it in GitHub Desktop.
Can't save object sessions
require 'rubygems'
require 'sinatra'
enable :sessions
before do
if session['rand'].nil?
session['rand'] = rand(1000)
end
if session['object'].nil?
session['object'] = Object.new
end
end
get '/' do
#session['rand'].to_s
session['object'].object_id.to_s
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment