merb_activerecord 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile
CHANGED
@@ -5,15 +5,15 @@ module Merb
|
|
5
5
|
def setup_session
|
6
6
|
MERB_LOGGER.info("Setting up session")
|
7
7
|
before = cookies[_session_id_key]
|
8
|
-
|
9
|
-
@_fingerprint = Marshal.dump(
|
8
|
+
request.session, cookies[_session_id_key] = Merb::ActiveRecordSession.persist(cookies[_session_id_key])
|
9
|
+
@_fingerprint = Marshal.dump(request.session.data).hash
|
10
10
|
@_new_cookie = cookies[_session_id_key] != before
|
11
11
|
end
|
12
12
|
|
13
13
|
def finalize_session
|
14
14
|
MERB_LOGGER.info("Finalize session")
|
15
|
-
|
16
|
-
set_cookie(_session_id_key,
|
15
|
+
request.session.save if @_fingerprint != Marshal.dump(request.session.data).hash
|
16
|
+
set_cookie(_session_id_key, request.session.session_id, _session_expiry) if (@_new_cookie || request.session.needs_new_cookie)
|
17
17
|
end
|
18
18
|
end # ActiveRecordMixin
|
19
19
|
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: merb_activerecord
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.4.
|
7
|
-
date: 2007-11-
|
6
|
+
version: 0.4.3
|
7
|
+
date: 2007-11-12 00:00:00 -06:00
|
8
8
|
summary: Merb plugin that provides ActiveRecord support for Merb
|
9
9
|
require_paths:
|
10
10
|
- lib
|