Changeset 2229
- Timestamp:
- 09/13/05 07:48:12 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/lib/action_controller/base.rb
r2228 r2229 347 347 include ActionController::UploadProgress 348 348 end 349 350 # Set the session store to be used for keeping the session data between requests. The default is using the351 # file system, but you can also specify one of the other included stores (:active_record_store, :drb_store,352 # :mem_cache_store, or :memory_store) or use your own class.353 def session_store=(store)354 ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager] =355 store.is_a?(Symbol) ? CGI::Session.const_get(store.to_s.camelize) : store356 end357 358 # Returns the session store class currently used.359 def session_store360 ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager]361 end362 363 # Returns the hash used to configure the session. Example use:364 #365 # ActionController::Base.session_options[:session_secure] = true # session only available over HTTPS366 def session_options367 ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS368 end369 349 end 370 350 trunk/actionpack/lib/action_controller/session_management.rb
r2031 r2229 11 11 12 12 module ClassMethods 13 # Set the session store to be used for keeping the session data between requests. The default is using the 14 # file system, but you can also specify one of the other included stores (:active_record_store, :drb_store, 15 # :mem_cache_store, or :memory_store) or use your own class. 16 def session_store=(store) 17 ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager] = 18 store.is_a?(Symbol) ? CGI::Session.const_get(store.to_s.camelize) : store 19 end 20 21 # Returns the session store class currently used. 22 def session_store 23 ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager] 24 end 25 26 # Returns the hash used to configure the session. Example use: 27 # 28 # ActionController::Base.session_options[:session_secure] = true # session only available over HTTPS 29 def session_options 30 ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS 31 end 32 13 33 # Specify how sessions ought to be managed for a subset of the actions on 14 34 # the controller. Like filters, you can specify <tt>:only</tt> and