1 # Filters added to this controller will be run for all controllers in the application.
2 # Likewise, all the methods added will be available for all controllers.
4 class ApplicationController < ActionController::Base
5 include AuthenticatedSystem
7 require_dependency "user"
10 before_filter :add_stylesheets
11 #before_filter :use_sitealizer
17 # this is defined is a sketchy way in the sitealizer mixin
18 # initalize. since i'm overloading that, i'm calling it here
19 $visits = [] unless $visits
23 file = "#{Dir.pwd}/public/stylesheets/#{controller_name}.css"
25 @stylesheets << controller_name
29 #both election_controller and quickvote_controller need this method
31 @vote = Vote.find(params[:id])
33 @vote.rankings.each do |ranking|
34 ranking.rank = params['rankings-list'].index(ranking.candidate.id.to_s) + 1
37 render :nothing => true