From 3dd50eadd62297cf65e497ca83a74c86cd4bfc6b Mon Sep 17 00:00:00 2001 From: Konstantin Haase Date: Thu, 14 Apr 2011 09:05:32 +0200 Subject: [PATCH] disable session_secret for Sinatra::Application in development mode (makes sessions usable out of the box with shotgun) --- lib/sinatra/base.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/sinatra/base.rb b/lib/sinatra/base.rb index e3a196fc16..753bb62c9b 100644 --- a/lib/sinatra/base.rb +++ b/lib/sinatra/base.rb @@ -1476,6 +1476,7 @@ class Application < Base set :logging, Proc.new { ! test? } set :method_override, true set :run, Proc.new { ! test? } + set :session_secret, Proc.new { super() unless development? } def self.register(*extensions, &block) #:nodoc: added_methods = extensions.map {|m| m.public_instance_methods }.flatten