From 8d72506e9cdaf024940902c2bd6b769e331b924d Mon Sep 17 00:00:00 2001 From: Chap Ambrose Date: Tue, 6 Jul 2010 15:43:33 -0400 Subject: [PATCH] Serialize vote.tracking --- app/models/vote.rb | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) diff --git a/app/models/vote.rb b/app/models/vote.rb index ad42945..81eb208 100644 --- a/app/models/vote.rb +++ b/app/models/vote.rb @@ -18,6 +18,8 @@ class Vote < ActiveRecord::Base named_scope :with_voter_ids, lambda { |*args| {:conditions => {:voter_id=> args.first }} } named_scope :active, :include => :choice, :conditions => { 'choices.active' => true } + serialize :tracking + after_create :update_winner_choice, :update_loser_choice def update_winner_choice -- libgit2 0.21.2