]> projects.mako.cc - selectricity-live/blobdiff - app/models/vote.rb
fixed the string modification function and added support for a titlecase method
[selectricity-live] / app / models / vote.rb
index 08dd1e7dd2c393bd2580eee0a02319d468a29265..014899d905ac9e07a185cd99f5abcae9db1d702f 100644 (file)
@@ -76,4 +76,8 @@ class Vote < ActiveRecord::Base
     self.votes = rel_votes.collect { |vote| candidate_ids[ vote - 1 ] }
   end
 
     self.votes = rel_votes.collect { |vote| candidate_ids[ vote - 1 ] }
   end
 
+  def votestring
+    self.votes.join("")
+  end
+
 end
 end

Benjamin Mako Hill || Want to submit a patch?