X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/469888b30ec666c4f5e11f0be42cab539b2a7ab4..4efa3e9bc47cc649205a399fde51ed7e61bef7f8:/app/controllers/site_controller.rb diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 6e77b48..8d2f8b2 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -1,6 +1,12 @@ class SiteController < ApplicationController layout 'vb' + model :user, :election def index + @current_elections = session[:user].elections.sort do |a,b| + b.enddate <=> a.enddate + end + + end end