aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-09-04 19:25:59 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-09-04 19:25:59 -0700
commita8f4568f5396b68ae81eddc636604bb78bb6632a (patch)
tree2679e79db845d2b2a2c4c4703f0004394ecb7ded /actionpack/lib
parentbcfa2a0d5e70b4217bd93550a69cb137acff1b07 (diff)
downloadrails-a8f4568f5396b68ae81eddc636604bb78bb6632a.tar.gz
rails-a8f4568f5396b68ae81eddc636604bb78bb6632a.tar.bz2
rails-a8f4568f5396b68ae81eddc636604bb78bb6632a.zip
implement abstract store methods
converts old ID methods to the new abstract store methods in Rack
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/middleware/session/cache_store.rb6
-rw-r--r--actionpack/lib/action_dispatch/middleware/session/cookie_store.rb4
2 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/session/cache_store.rb b/actionpack/lib/action_dispatch/middleware/session/cache_store.rb
index 857e49a682..589ae46e38 100644
--- a/actionpack/lib/action_dispatch/middleware/session/cache_store.rb
+++ b/actionpack/lib/action_dispatch/middleware/session/cache_store.rb
@@ -18,7 +18,7 @@ module ActionDispatch
end
# Get a session from the cache.
- def get_session(env, sid)
+ def find_session(env, sid)
unless sid and session = @cache.read(cache_key(sid))
sid, session = generate_sid, {}
end
@@ -26,7 +26,7 @@ module ActionDispatch
end
# Set a session in the cache.
- def set_session(env, sid, session, options)
+ def write_session(env, sid, session, options)
key = cache_key(sid)
if session
@cache.write(key, session, :expires_in => options[:expire_after])
@@ -37,7 +37,7 @@ module ActionDispatch
end
# Remove a session from the cache.
- def destroy_session(env, sid, options)
+ def delete_session(env, sid, options)
@cache.delete(cache_key(sid))
generate_sid
end
diff --git a/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb b/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb
index 01cf034110..3f7011d100 100644
--- a/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb
+++ b/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb
@@ -71,7 +71,7 @@ module ActionDispatch
super(app, options.merge!(:cookie_only => true))
end
- def destroy_session(req, session_id, options)
+ def delete_session(req, session_id, options)
new_sid = generate_sid unless options[:drop]
# Reset hash and Assign the new session id
req.set_header("action_dispatch.request.unsigned_session_cookie", new_sid ? { "session_id" => new_sid } : {})
@@ -112,7 +112,7 @@ module ActionDispatch
data
end
- def set_session(req, sid, session_data, options)
+ def write_session(req, sid, session_data, options)
session_data["session_id"] = sid
session_data
end