]> projects.mako.cc - selectricity/blobdiff - app/models/voter.rb
Add some empty request testcases.
[selectricity] / app / models / voter.rb
index 7139b899a725fd6b32de66393f7decc58a5d99c8..f229909814c12fbd51beeb120061661ef87a67ec 100644 (file)
@@ -2,7 +2,14 @@ class Voter < ActiveRecord::Base
   belongs_to :election
   has_one :vote
 
+  def destroy
+    vote.destroy if vote
+    super
+  end
+
+  def voted?
+    vote.confirmed == 1
+  end
 end
 
 
-

Benjamin Mako Hill || Want to submit a patch?