<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -69,11 +69,16 @@ module ActionController #:nodoc:
       #   session :off, 
       #     :if =&gt; Proc.new { |req| !(req.format.html? || req.format.js?) }
       #
+      #   # turn the session back on, useful when it was turned off in the
+      #   # application controller, and you need it on in another controller
+      #   session :on
+      #
       # All session options described for ActionController::Base.process_cgi
       # are valid arguments.
       def session(*args)
         options = args.extract_options!
 
+        options[:disabled] = false if args.delete(:on)
         options[:disabled] = true if !args.empty?
         options[:only] = [*options[:only]].map { |o| o.to_s } if options[:only]
         options[:except] = [*options[:except]].map { |o| o.to_s } if options[:except]</diff>
      <filename>actionpack/lib/action_controller/session_management.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,6 +13,19 @@ class SessionManagementTest &lt; Test::Unit::TestCase
     end
   end
 
+  class SessionOffOnController &lt; ActionController::Base
+    session :off
+    session :on, :only =&gt; :tell
+
+    def show
+      render :text =&gt; &quot;done&quot;
+    end
+
+    def tell
+      render :text =&gt; &quot;done&quot;
+    end
+  end
+
   class TestController &lt; ActionController::Base
     session :off, :only =&gt; :show
     session :session_secure =&gt; true, :except =&gt; :show
@@ -100,6 +113,15 @@ class SessionManagementTest &lt; Test::Unit::TestCase
     assert_equal false, @request.session_options
   end
 
+  def test_session_off_then_on_globally
+    @controller = SessionOffOnController.new
+    get :show
+    assert_equal false, @request.session_options
+    get :tell
+    assert_instance_of Hash, @request.session_options
+    assert_equal false, @request.session_options[:disabled]
+  end
+  
   def test_session_off_conditionally
     @controller = TestController.new
     get :show</diff>
      <filename>actionpack/test/controller/session_management_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8857994f92293a78df9addbc0998ef02fca82fae</id>
    </parent>
  </parents>
  <author>
    <name>David Heinemeier Hansson</name>
    <email>david@loudthinking.com</email>
  </author>
  <url>http://github.com/rails/rails/commit/c43623c48b977d05413d86867651bfc3762b745a</url>
  <id>c43623c48b977d05413d86867651bfc3762b745a</id>
  <committed-date>2008-05-11T11:18:49-07:00</committed-date>
  <authored-date>2008-05-11T11:18:49-07:00</authored-date>
  <message>Added session(:on) to turn session management back on in a controller subclass if the superclass turned it off (Peter Jones) [#136 state:resolved]</message>
  <tree>4ef380d032f57fdff2e9567fcc7b76db96249a6e</tree>
  <committer>
    <name>David Heinemeier Hansson</name>
    <email>david@loudthinking.com</email>
  </committer>
</commit>
