diff options
author | José Valim <jose.valim@gmail.com> | 2011-06-30 08:01:26 -0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-06-30 08:01:53 -0300 |
commit | f34f0b7e0832a1910ab9c71080e024c8e36504b2 (patch) | |
tree | d2f8a5f6c51ae09cda6d45624606c868960f11bf /actionpack/lib/action_dispatch | |
parent | d1b61883162278e334e2892d193b31395bb47032 (diff) | |
download | rails-f34f0b7e0832a1910ab9c71080e024c8e36504b2.tar.gz rails-f34f0b7e0832a1910ab9c71080e024c8e36504b2.tar.bz2 rails-f34f0b7e0832a1910ab9c71080e024c8e36504b2.zip |
Add has_key? and key? methods to CookieJar removed in 0ca69ca65f83b4bb34f8
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/cookies.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/cookies.rb b/actionpack/lib/action_dispatch/middleware/cookies.rb index 8cee9ecdc4..1c312f2587 100644 --- a/actionpack/lib/action_dispatch/middleware/cookies.rb +++ b/actionpack/lib/action_dispatch/middleware/cookies.rb @@ -129,6 +129,11 @@ module ActionDispatch @cookies[name.to_s] end + def key?(name) + @cookies.key?(name.to_s) + end + alias :has_key? :key? + def update(other_hash) @cookies.update other_hash.stringify_keys self |