merged fixes from devel
authorroot <root@epicenter>
Sat, 27 Dec 2008 12:54:39 +0000 (07:54 -0500)
committerroot <root@epicenter>
Sat, 27 Dec 2008 12:54:39 +0000 (07:54 -0500)
app/controllers/election_controller.rb
app/views/common/_methodinfo_condorcet.rhtml
app/views/common/_methodinfo_ssd.rhtml
db/schema.rb

index 5c13a8128cdfa6781240bc6b9937d0e533482afd..ccbbafe282bb2add4fc809c246f69a60b6bb04fb 100644 (file)
@@ -160,7 +160,7 @@ class ElectionController < ApplicationController
                                         :locals => { :page => 'review' }
 
     @election = Election.find(params[:id])
-    if @election.type == QuickVote
+    if @election.class  == QuickVote
       redirect_to(:controller => 'quickvote', :action => 'index', :ident => @election.id)
     end
       
index 743dd455fd672d50198b25626863f6e55f73d856..b941eea258158ab9657b23423796b64d909fac39 100644 (file)
@@ -19,7 +19,7 @@ another Condorcet system.</p>
   There are too many candidates in your elections to show the result
   tables. 
 
-  <% if not @election.type == QuickVote %>
+  <% if not @election.class == QuickVote %>
     <%= link_to "Click here", { :action => 'pref_tables', :id => @voter.password }, :popup => [] %>
     to view details.
   <% end %>
index 00f9febe01d0270a57a13c5b840a5c4bd06bfe24..230191ca381c86581fd377c5729bd6cf032fe5ea 100644 (file)
@@ -31,7 +31,7 @@ Beatpath Winner, Path Voting, and Path Winner.</p>
   There are too many candidates in your elections to show the result
   tables.
 
-  <% if not @election.type == QuickVote %>
+  <% if not @election.class == QuickVote %>
     <%= link_to "Click here", { :action => 'pref_tables', :id => @voter.password }, :popup => [] %>
     to view details.
   <% end %>
index 0d99d2e959895f1b34b81551bdd0c25e5fb8926d..c30d3f6432ce8537f02313607ea7d17c56683169 100644 (file)
@@ -9,7 +9,7 @@
 #
 # It's strongly recommended to check this file into your version control system.
 
-ActiveRecord::Schema.define(:version => 3) do
+ActiveRecord::Schema.define(:version => 3)
 
   create_table "candidates", :force => true do |t|
     t.integer "election_id",                :null => false
@@ -18,38 +18,34 @@ ActiveRecord::Schema.define(:version => 3) do
   end
 
   create_table "elections", :force => true do |t|
-    t.string   "name",                :limit => 100,                    :null => false
-    t.text     "description",                                           :null => false
-    t.integer  "anonymous",           :limit => 1,   :default => 1,     :null => false
+    t.string   "name",            :limit => 100,                    :null => false
+    t.text     "description",                                       :null => false
+    t.integer  "anonymous",       :limit => 1,   :default => 1,     :null => false
     t.datetime "startdate"
-    t.datetime "enddate",                                               :null => false
-    t.integer  "active",              :limit => 1,   :default => 0,     :null => false
-    t.integer  "viewable",            :limit => 1,   :default => 1,     :null => false
-    t.integer  "notices",             :limit => 1,   :default => 0,     :null => false
+    t.datetime "enddate",                                           :null => false
+    t.integer  "active",          :limit => 1,   :default => 0,     :null => false
+    t.integer  "viewable",        :limit => 1,   :default => 1,     :null => false
+    t.integer  "notices",         :limit => 1,   :default => 0,     :null => false
     t.integer  "user_id"
     t.string   "quickuser"
-    t.string   "election_method",     :limit => 100, :default => "ssd"
-    t.string   "type",                :limit => 100,                    :null => false
-    t.boolean  "embeddable",                         :default => false, :null => false
-    t.boolean  "authenticated",                      :default => true,  :null => false
-    t.boolean  "early_results",                      :default => false, :null => false
-    t.string   "embed_custom_string"
+    t.string   "election_method", :limit => 100, :default => "ssd"
+    t.string   "type",            :limit => 100,                    :null => false
+    t.boolean  "embeddable",                     :default => false, :null => false
+    t.boolean  "authenticated",                  :default => true,  :null => false
+    t.boolean  "early_results",                  :default => false, :null => false
   end
 
   add_index "elections", ["user_id"], :name => "fk_user_election"
 
   create_table "pictures", :force => true do |t|
-    t.string   "filename"
-    t.string   "content_type"
-    t.integer  "size"
-    t.integer  "width"
-    t.integer  "height"
-    t.integer  "parent_id"
-    t.string   "thumbnail"
-    t.datetime "created_at"
-    t.integer  "candidate_id"
+    t.string  "filename",     :limit => 200
+    t.binary  "data"
+    t.string  "filetype",     :limit => 100
+    t.integer "candidate_id"
   end
 
+  add_index "pictures", ["candidate_id"], :name => "fk_candidate_picture"
+
   create_table "rankings", :force => true do |t|
     t.integer "vote_id"
     t.integer "candidate_id"

Benjamin Mako Hill || Want to submit a patch?