Don't write nil values to default session options hash
This commit is contained in:
parent
95c839bd2a
commit
9a733f6c64
@ -17,9 +17,15 @@ def self.new(app)
|
||||
cgi_options = ActionController::Base.session_options
|
||||
options = cgi_options.symbolize_keys
|
||||
options = DEFAULT_OPTIONS.merge(options)
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user