diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-12-16 00:04:04 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-12-16 00:04:04 -0600 |
commit | 9a733f6c640cb3c4d474ecf44dd62ab73e351fd5 (patch) | |
tree | 89916886926fd9e9dab2f9c988c3ff9f931d98eb | |
parent | 95c839bd2aca1576a33a6503f0dd67266d53a353 (diff) | |
download | rails-9a733f6c640cb3c4d474ecf44dd62ab73e351fd5.tar.gz rails-9a733f6c640cb3c4d474ecf44dd62ab73e351fd5.tar.bz2 rails-9a733f6c640cb3c4d474ecf44dd62ab73e351fd5.zip |
Don't write nil values to default session options hash
-rw-r--r-- | actionpack/lib/action_controller/session_management.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/session_management.rb b/actionpack/lib/action_controller/session_management.rb index dd5001d328..a9989d8198 100644 --- a/actionpack/lib/action_controller/session_management.rb +++ b/actionpack/lib/action_controller/session_management.rb @@ -17,9 +17,15 @@ module ActionController #:nodoc: cgi_options = ActionController::Base.session_options options = cgi_options.symbolize_keys options = DEFAULT_OPTIONS.merge(options) - options[:path] = options.delete(:session_path) - options[:key] = options.delete(:session_key) - options[:httponly] = options.delete(:session_http_only) + if options.has_key?(:session_path) + options[:path] = options.delete(:session_path) + end + if options.has_key?(:session_key) + options[:key] = options.delete(:session_key) + end + if options.has_key?(:session_http_only) + options[:httponly] = options.delete(:session_http_only) + end if store = ActionController::Base.session_store store.new(app, options) |