1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add AbstractCookieJar class.

Eventually this will be the superclass of all the chained jars.
This commit is contained in:
Kasper Timm Hansen 2015-09-06 17:40:08 +02:00
parent ed3d213eb6
commit 143d047d65

View file

@ -412,7 +412,7 @@ module ActionDispatch
end
end
class PermanentCookieJar #:nodoc:
class AbstractCookieJar # :nodoc:
include ChainedCookieJars
def initialize(parent_jar)
@ -422,7 +422,9 @@ module ActionDispatch
def [](name)
@parent_jar[name.to_s]
end
end
class PermanentCookieJar < AbstractCookieJar # :nodoc:
def []=(name, options)
if options.is_a?(Hash)
options.symbolize_keys!