1 # Filters added to this controller apply to all controllers in the application.
2 # Likewise, all the methods added will be available for all controllers.
4 class ApplicationController < ActionController::Base
5 # Pick a unique cookie name to distinguish our session data from others'
6 session :session_key => '_kwestie_session_id'
9 include AuthenticatedSystem
10 before_filter :set_current_user
12 #FIXME: this is copy and paste from PermalinksHelper
14 def nice_permalink_url(issue)
15 nice_permalink_route_url( :year => issue.year, :month => issue.month, :day => issue.day, :permalink => issue.permalink.link_name )
17 def nice_permalink_path(issue)
18 nice_permalink_route_path( :year => issue.year, :month => issue.month, :day => issue.day, :permalink => issue.permalink.link_name )
23 User.current_user = current_user
26 def redirect_back_or(path)
28 rescue ActionController::RedirectBackError