This project is archived and is in readonly mode.
config.action_controller.session_options is broken
Reported by Ozgun Ataman | April 12th, 2009 @ 06:37 AM | in 2.x
When used to set something like:
config.action_controller.session_options[:cookie_only] = true
inside, say, production.rb (environment initializer)
raises an error at time of initialization:
undefined method []=' for nil:NilClass
On the other hand, the following form works without any issues:
ActionController::Base.session_options[:cookie_only] = true
but seems to break something in the initialization as it stops the
ActionController::Caching::Sweeper
class from being loaded.
Some context information: Rails Version: 2.3.2 Passenger: 2.1.2
Comments and changes to this ticket
-
Ozgun Ataman April 12th, 2009 @ 06:38 AM
- Title changed from config.action_controller.session_options does not work to config.action_controller.session_options is broken
-
Dave May 8th, 2009 @ 03:58 AM
I think you're getting that error because the latest Rails uses;
config.action_controller.session = {}
as the new way to set configuration on sessions.
-
Cheah Chu Yeow May 12th, 2009 @ 06:04 PM
Dave's right :)
Try this instead Ozgun:
config.action_controller.session = { :cookie_only => true }
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>