]> projects.mako.cc - selectricity-live/commitdiff
merged changes back from live
author<mako@atdot.cc> <>
Mon, 11 Feb 2008 15:50:53 +0000 (10:50 -0500)
committer<mako@atdot.cc> <>
Mon, 11 Feb 2008 15:50:53 +0000 (10:50 -0500)
app/views/front/_user_summary.rhtml
app/views/layouts/frontpage.rhtml
config/environments/production.rb
config/mongrel_cluster.yml [new file with mode: 0644]
script/cluster [new file with mode: 0755]

index ce65bbac698f7207bca27446e0a6e081b17a4468..30b3799b6157c4beb914bac3590ec1f452a5a383 100644 (file)
@@ -3,8 +3,12 @@
 <% 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 %>
index 570a4f3942cf8314bddbede177a9281488302b37..2ebf153290e7e5179464a6a4f5dec9af534f17e7 100644 (file)
@@ -13,7 +13,7 @@
     <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] %>
        &nbsp;&nbsp;<%= link_to( 'log out', :controller => 'account', 
index d1b8f88479fbf2597c18ed3baaae3c5a2f248909..20ded00559a49d05e95a180342e910687db7bcfd 100644 (file)
@@ -3,6 +3,7 @@
 #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
diff --git a/config/mongrel_cluster.yml b/config/mongrel_cluster.yml
new file mode 100644 (file)
index 0000000..8c3953e
--- /dev/null
@@ -0,0 +1,10 @@
+--- 
+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
diff --git a/script/cluster b/script/cluster
new file mode 100755 (executable)
index 0000000..52f4ae4
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+PATH=/var/lib/gems/1.8/bin:$PATH
+
+mongrel_rails cluster::$1

Benjamin Mako Hill || Want to submit a patch?