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"
9 before_filter :add_stylesheets
16 file = "#{Dir.pwd}/public/stylesheets/#{controller_name}.css"
18 @stylesheets << controller_name
22 #both election_controller and quickvote_controller need this method
24 @vote = Vote.find(params[:id])
26 @vote.rankings.each do |ranking|
27 ranking.rank = params['rankings-list'].index(ranking.candidate.id.to_s) + 1
30 render :nothing => true