# Filters added to this controller apply to all controllers in the application. # Likewise, all the methods added will be available for all controllers. class ApplicationController < ActionController::Base # Pick a unique cookie name to distinguish our session data from others' session :session_key => '_answerfortraffic_session_id' # Referral tracking #if params[:r] then #cookies[:aft_referrer] = 'test' #session[:referrer] = 'test' #end #if session[:referrer] = nil and params[:r].size > 0 # session[:referrer] = params[:r] #end def foo session[:foo] = bar end self.foo end