<% else %>
<ul>
<% for election in @current_elections %>
- <li><%= link_to election.name, :controller => 'election', :action => 'show', :id => election.id %> (ends in <em><%=
- distance_of_time_in_words Time.now, election.enddate %></em>)</li>
+ <li><%= link_to election.name, :controller => 'election', :action => 'show', :id => election.id %>
+ <% if Time.now > election.enddate %>
+ (election over)
+ <% else %>
+ (ends in <em><%= distance_of_time_in_words Time.now, election.enddate %></em>)</li>
+ <% end %>
<% end %>
</ul>
<% end %>
<div id="header">
<div id="top-bar">
<% if session[:user]%>
- <%= link_to User.find(session[:user]).login.dowcase,
+ <%= link_to User.find(session[:user]).login.downcase,
:controller => "account",
:action => "summary", :id => session[:user][:id] %>
<%= link_to( 'log out', :controller => 'account',
#Enable memcache
#require('memcache')
#Cache=MemCache.new('localhost', :compression => true)
+Cache=nil
# The production environment is meant for finished, "live" apps.
# Code is not reloaded between requests
config.cache_classes = true
--- /dev/null
+---
+user: selectricity
+cwd: /org/selectricity/www/selectricity-live
+log_file: log/mongrel.log
+port: "8000"
+environment: production
+group: selectricity
+address: 127.0.0.1
+pid_file: tmp/pids/mongrel.pid
+servers: 3
--- /dev/null
+#!/bin/sh
+
+PATH=/var/lib/gems/1.8/bin:$PATH
+
+mongrel_rails cluster::$1