Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

config.action_controller.session_options is broken

#2484

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

Reported by Ozgun Ataman · April 12th, 2009 @ 06:37 AM

State: invalid
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Ozgun Ataman
    Ozgun Ataman
    • Title changed from config.action_controller.session_options does not work to config.action_controller.session_options is broken

    April 12th, 2009 @ 06:38 AM

  2. Dave
    Dave

    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.

    May 8th, 2009 @ 03:58 AM

  3. Cheah Chu Yeow
    Cheah Chu Yeow

    Dave's right :)

    Try this instead Ozgun:

    
    config.action_controller.session = {
      :cookie_only => true
    }
    

    May 12th, 2009 @ 06:04 PM

  4. Ryan Bigg
    Ryan Bigg
    • State changed from new to invalid

    Not a bug in Rails.

    April 11th, 2010 @ 03:06 AM