Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 341
- Log:
Lots of changes to Hub to make it Rails 2.3.11 compatible. This is being
checked in as one large changeset because it doesn't really split down into
smaller components without having something that doesn't function in the
intermediate steps.
- Author:
- rool
- Date:
- Sat Mar 19 19:11:39 +0000 2011
- Size:
- 1175 Bytes
1 | ######################################################################## |
2 | # File:: session_store.rb |
3 | # (C):: https://gist.github.com/570149 |
4 | # |
5 | # Purpose:: Rails 2.3.9 and 2.3.10 don't work properly when either |
6 | # ActiveRecord or MemCache are used for the session store. |
7 | # Although Hub isn't configured that way by default, |
8 | # this patch is included in an attempt to keep things from |
9 | # breaking should an installer choose an affected store. |
10 | # ---------------------------------------------------------------------- |
11 | # 27-Jan-2011 (ADH): Created. |
12 | ######################################################################## |
13 | |
14 | affected = %w[ActiveRecord::SessionStore ActionController::Session::MemCacheStore] |
15 | |
16 | target = Rails.configuration.middleware.detect do |mid| |
17 | mid.klass.is_a? Class and affected.include? mid.klass.to_s |
18 | end |
19 | |
20 | if target |
21 | class RailsCookieMonster |
22 | def initialize(app) |
23 | @app = app |
24 | end |
25 | |
26 | def call(env) |
27 | # monster MUST HAVE COOKIES om nom nom nom |
28 | env['HTTP_COOKIE'] ||= "" |
29 | @app.call(env) |
30 | end |
31 | end |
32 | |
33 | Rails.configuration.middleware.insert_before target, RailsCookieMonster |
34 | end |