Removed the two methods from Application controller which were redundant -
[selectricity] / app / controllers / graph_controller.rb
index 4f33ac3a3f7b02d212a7362ca9b26f10d0e22f3a..9ab2a4c1a5a8ccacfb463c0ac7046755e7be19c2 100644 (file)
@@ -21,7 +21,8 @@ class GraphController < ApplicationController
     line.draw
     send_data(line.to_blob, :disposition => 'inline', :type => 'image/png')
   end
+  
+  #will place votes in a fixed number of intervals, and shows votes over time
   def votes_per_interval
     @election = Election.find(params[:id])
     data, labels = get_votes_per_interval_data(@election)
@@ -43,6 +44,23 @@ class GraphController < ApplicationController
     send_data(line.to_blob, :disposition => 'inline', :type => 'image/png')  
   end
  
+  def quickvote_bar
+    @election = Election.find(params[:id])
+  end
+  
+  def borda_bar
+    @election = Election.find(params[:id])
+    
+    #Get the list of candidates from the election, and calculate how RubyVote
+    #gave each one points
+    @election.candidates.each do |candidate|
+    
+    #Tabulate how many points each candidate received
+    #Make the name of each candidate a label under the correspoding column
+    #done!
+  end
+  
  private 
  
   # generate the data and labels for each graph

Benjamin Mako Hill || Want to submit a patch?