Skip to content

Commit

Permalink
disable session_secret for Sinatra::Application in development mode (…
Browse files Browse the repository at this point in the history
…makes sessions usable out of the box with shotgun)
  • Loading branch information
rkh committed Apr 14, 2011
1 parent 13b79de commit 3dd50ea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/sinatra/base.rb
Expand Up @@ -1476,6 +1476,7 @@ class Application < Base
set :logging, Proc.new { ! test? } set :logging, Proc.new { ! test? }
set :method_override, true set :method_override, true
set :run, Proc.new { ! test? } set :run, Proc.new { ! test? }
set :session_secret, Proc.new { super() unless development? }


def self.register(*extensions, &block) #:nodoc: def self.register(*extensions, &block) #:nodoc:
added_methods = extensions.map {|m| m.public_instance_methods }.flatten added_methods = extensions.map {|m| m.public_instance_methods }.flatten
Expand Down

0 comments on commit 3dd50ea

Please sign in to comment.