Skip to content
Browse files

Changed hash syntax, should make it 1.8.x proof

  • Loading branch information...
1 parent f9fdf18 commit 9ba1233871464611873fc9de7f510d34ea61acb2 @coffeeaddict committed Mar 29, 2012
Showing with 7 additions and 7 deletions.
  1. +7 −7 lib/padrino-cookies/jar.rb
View
14 lib/padrino-cookies/jar.rb
@@ -17,9 +17,9 @@ def initialize(app)
end
@options = {
- path: '/',
- httponly: true,
- secure: @request.secure?
+ :path => '/',
+ :httponly => true,
+ :secure => @request.secure?
}
end
@@ -77,7 +77,7 @@ def [](name)
# @api public
def []=(name, options)
unless options.is_a?(Hash)
- options = { value: options }
+ options = { :value => options }
end
raise Overflow if options[:value].size > MAX_COOKIE_SIZE
@@ -239,7 +239,7 @@ def initialize(parent_jar, secret)
end
def []=(name, options)
- options = { value: options } unless options.is_a?(Hash)
+ options = { :value => options } unless options.is_a?(Hash)
options[:expires] = 1.year.from_now
@parent_jar[name] = options
end
@@ -272,7 +272,7 @@ def [](name)
end
def []=(name, options)
- options = { value: options } unless options.is_a?(Hash)
+ options = { :value => options } unless options.is_a?(Hash)
options[:value] = @message_verifier.generate(options[:value])
@parent_jar[name] = options
end
@@ -286,4 +286,4 @@ def method_missing(method, *args, &block)
end
end # SignedJar
end # Cookies
-end # Padrino
+end # Padrino

0 comments on commit 9ba1233

Please sign in to comment.
Something went wrong with that request. Please try again.