Ruby on Rails
HowtoPerActionSessionOptions

Session options may be set per-action using the session macro:

  class MyController < ApplicationController
    session :off
  end

The above would turn sessions off for all actions of MyController? (and its descendants). If you only want to turn sessions off for a specific set of actions:

  class MyController < ApplicationController
    session :off, :only => %w(this_action that_action)

    def this_action
    end

    def that_action
    end

    def other_action
    end
  end

You can also set session options, instead of disabling sessions:

  class MyController < ApplicationController
    session :prefix => "eliteapp.", :only => %w(this_action that_action)

    def this_action
    end

    def that_action
    end

    def other_action
    end
  end

For more information, see the Session Management module .

category:Howto