Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 373
- Log:
Initial import of Radiant 0.9.1, which is now packaged as a gem. This is an
import of the tagged 0.9.1 source checked out from GitHub, which isn't quite
the same as the gem distribution - but it doesn't seem to be available in an
archived form and the installed gem already has modifications, so this is
the closest I can get.
- Author:
- rool
- Date:
- Mon Mar 21 13:40:05 +0000 2011
- Size:
- 1795 Bytes
1 | module ActionController #:nodoc: |
2 | module SessionManagement #:nodoc: |
3 | def self.included(base) |
4 | base.class_eval do |
5 | extend ClassMethods |
6 | end |
7 | end |
8 | |
9 | module ClassMethods |
10 | # Set the session store to be used for keeping the session data between requests. |
11 | # By default, sessions are stored in browser cookies (<tt>:cookie_store</tt>), |
12 | # but you can also specify one of the other included stores (<tt>:active_record_store</tt>, |
13 | # <tt>:mem_cache_store</tt>, or your own custom class. |
14 | def session_store=(store) |
15 | if store == :active_record_store |
16 | self.session_store = ActiveRecord::SessionStore |
17 | else |
18 | @@session_store = store.is_a?(Symbol) ? |
19 | Session.const_get(store.to_s.camelize) : |
20 | store |
21 | end |
22 | end |
23 | |
24 | # Returns the session store class currently used. |
25 | def session_store |
26 | if defined? @@session_store |
27 | @@session_store |
28 | else |
29 | Session::CookieStore |
30 | end |
31 | end |
32 | |
33 | def session=(options = {}) |
34 | self.session_store = nil if options.delete(:disabled) |
35 | session_options.merge!(options) |
36 | end |
37 | |
38 | # Returns the hash used to configure the session. Example use: |
39 | # |
40 | # ActionController::Base.session_options[:secure] = true # session only available over HTTPS |
41 | def session_options |
42 | @session_options ||= {} |
43 | end |
44 | |
45 | def session(*args) |
46 | ActiveSupport::Deprecation.warn( |
47 | "Disabling sessions for a single controller has been deprecated. " + |
48 | "Sessions are now lazy loaded. So if you don't access them, " + |
49 | "consider them off. You can still modify the session cookie " + |
50 | "options with request.session_options.", caller) |
51 | end |
52 | end |
53 | end |
54 | end |