class ApplicationController < ActionController::Base protect_from_forgery before_filter :record_history def record_history debugger @history = session[:history] || [] unless params[:controller] == "sessions" @history << "#{params[:controller]}:#{params[:action]}" end session[:history] = @history end end