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
|
cgi_options = ActionController::Base.session_options
|
||||||
options = cgi_options.symbolize_keys
|
options = cgi_options.symbolize_keys
|
||||||
options = DEFAULT_OPTIONS.merge(options)
|
options = DEFAULT_OPTIONS.merge(options)
|
||||||
options[:path] = options.delete(:session_path)
|
if options.has_key?(:session_path)
|
||||||
options[:key] = options.delete(:session_key)
|
options[:path] = options.delete(:session_path)
|
||||||
options[:httponly] = options.delete(:session_http_only)
|
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
|
if store = ActionController::Base.session_store
|
||||||
store.new(app, options)
|
store.new(app, options)
|
||||||
|
Loading…
Reference in New Issue
Block a user