public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Search Repo:
rollback [5833] and [5835]

git-svn-id: 
http://svn-commit.rubyonrails.org/rails/branches/1-2-pre-release@5837 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
technoweenie (author)
Thu Jan 04 13:42:32 -0800 2007
commit  e9a7b233f6b44abd9e50fb6e734f897ba9b3333a
tree    8b18ee546f3d2d10d1a623eea0804a2df21dc25e
parent  21e4825596db063349f1b3637c5ced1f5cef4ae4
...
1
2
3
4
5
6
7
...
1
2
 
 
3
4
5
0
@@ -1,7 +1,5 @@
0
 *1.13.0 RC2*
0
 
0
-* Allow ActionController::Base.session_store and #fragment_cache_store to lazily load the session class to allow for custom session store plugins. [Rick Olson]
0
-
0
 * Make sure html_document is reset between integration test requests. [ctm]
0
 
0
 * Set session to an empty hash if :new_session => false and no session cookie or param is present. CGI::Session was raising an unrescued ArgumentError. [Josh Susser]
...
307
308
309
310
 
311
312
313
314
 
 
 
315
316
317
318
319
 
320
321
322
...
307
308
309
 
310
311
 
 
 
312
313
314
315
316
317
318
 
319
320
321
322
0
@@ -307,16 +307,16 @@
0
       def self.included(base) #:nodoc:
0
         base.class_eval do
0
           @@fragment_cache_store = MemoryStore.new
0
- cattr_writer :fragment_cache_store
0
+ cattr_reader :fragment_cache_store
0
 
0
- def self.fragment_cache_store
0
- @@fragment_cache_store = if @@fragment_cache_store.is_a?(Array)
0
- store, *parameters = *([ @@fragment_cache_store ].flatten)
0
+ def self.fragment_cache_store=(store_option)
0
+ store, *parameters = *([ store_option ].flatten)
0
+ @@fragment_cache_store = if store.is_a?(Symbol)
0
               store_class_name = (store == :drb_store ? "DRbStore" : store.to_s.camelize)
0
               store_class = ActionController::Caching::Fragments.const_get(store_class_name)
0
               store_class.new(*parameters)
0
             else
0
- @@fragment_cache_store
0
+ store
0
             end
0
           end
0
         end
...
18
19
20
21
 
 
22
23
24
25
26
27
 
28
29
30
...
18
19
20
 
21
22
23
24
25
26
 
 
27
28
29
30
0
@@ -18,13 +18,13 @@
0
       # file system, but you can also specify one of the other included stores (:active_record_store, :drb_store,
0
       # :mem_cache_store, or :memory_store) or use your own class.
0
       def session_store=(store)
0
- ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager] = store
0
+ ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager] =
0
+ store.is_a?(Symbol) ? CGI::Session.const_get(store == :drb_store ? "DRbStore" : store.to_s.camelize) : store
0
       end
0
 
0
       # Returns the session store class currently used.
0
       def session_store
0
- store = ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager]
0
- self.session_store = store.is_a?(Symbol) ? CGI::Session.const_get(store == :drb_store ? "DRbStore" : store.to_s.camelize) : store
0
+ ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager]
0
       end
0
 
0
       # Returns the hash used to configure the session. Example use:

Comments

    No one has commented yet.