]> projects.mako.cc - selectricity/blob - app/controllers/site_controller.rb
41eb136a3758256cd066c32cb885ba2259aed2eb
[selectricity] / app / controllers / site_controller.rb
1 class SiteController < ApplicationController
2   layout 'vb'
3   model :user, :election
4
5   def index
6     if session[:user]
7       session[:user] = User.find(session[:user].id)
8       @current_elections = session[:user].elections.sort do |a,b|
9         b.enddate <=> a.enddate
10       end
11     end
12   end
13
14 end

Benjamin Mako Hill || Want to submit a patch?