X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/469888b30ec666c4f5e11f0be42cab539b2a7ab4..3096416bbb8fdc92d7619aecc8237a57532d9066:/app/controllers/site_controller.rb diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 6e77b48..daa74f8 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -1,6 +1,14 @@ class SiteController < ApplicationController - layout 'vb' + layout 'hc' + model :user, :election def index + if session[:user] + session[:user] = User.find(session[:user].id) + @current_elections = session[:user].elections.sort do |a,b| + b.enddate <=> a.enddate + end + end end + end