diff options
author | Carl Lerche <carllerche@mac.com> | 2010-03-03 21:16:35 -0800 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2010-03-03 21:24:27 -0800 |
commit | 15b3b74624eb4c5ae383956950cab12ca9899131 (patch) | |
tree | 7a8c5cf8044d79a7656abff25c080e06e7423d4c /actionpack/lib/action_controller/metal | |
parent | 1f0f05b10c924d2f0d0ff4c74cbd979e77deea1d (diff) | |
download | rails-15b3b74624eb4c5ae383956950cab12ca9899131.tar.gz rails-15b3b74624eb4c5ae383956950cab12ca9899131.tar.bz2 rails-15b3b74624eb4c5ae383956950cab12ca9899131.zip |
Fix all the broken tests due to the AC configuration refactor
Diffstat (limited to 'actionpack/lib/action_controller/metal')
-rw-r--r-- | actionpack/lib/action_controller/metal/compatibility.rb | 3 | ||||
-rw-r--r-- | actionpack/lib/action_controller/metal/session_management.rb | 22 |
2 files changed, 16 insertions, 9 deletions
diff --git a/actionpack/lib/action_controller/metal/compatibility.rb b/actionpack/lib/action_controller/metal/compatibility.rb index 9471f36de3..4c2136de8a 100644 --- a/actionpack/lib/action_controller/metal/compatibility.rb +++ b/actionpack/lib/action_controller/metal/compatibility.rb @@ -91,6 +91,9 @@ module ActionController deprecated_config_writer :session_store deprecated_config_writer :session_options deprecated_config_accessor :relative_url_root, "relative_url_root is ineffective. Please stop using it" + deprecated_config_accessor :assets_dir + deprecated_config_accessor :javascripts_dir + deprecated_config_accessor :stylesheets_dir # For old tests def initialize_template_class(*) end diff --git a/actionpack/lib/action_controller/metal/session_management.rb b/actionpack/lib/action_controller/metal/session_management.rb index 09ef9261a4..ce8b20964b 100644 --- a/actionpack/lib/action_controller/metal/session_management.rb +++ b/actionpack/lib/action_controller/metal/session_management.rb @@ -3,24 +3,28 @@ module ActionController #:nodoc: extend ActiveSupport::Concern included do - self.config.session_store ||= :cookie_store + # This is still needed for the session secret for some reason. self.config.session_options ||= {} end + def self.session_store_for(store) + case store + when :active_record_store + ActiveRecord::SessionStore + when Symbol + ActionDispatch::Session.const_get(store.to_s.camelize) + else + store + end + end + module ClassMethods def session_options config.session_options end def session_store - case store = config.session_store - when :active_record_store - ActiveRecord::SessionStore - when Symbol - ActionDispatch::Session.const_get(store.to_s.camelize) - else - store - end + SessionManagement.session_store_for(config.session_store) end def session=(options = {}) |