Commit 8d72506e9cdaf024940902c2bd6b769e331b924d

Authored by Chap Ambrose
1 parent 9c8210cc

Serialize vote.tracking

Showing 1 changed file with 2 additions and 0 deletions   Show diff stats
app/models/vote.rb
@@ -18,6 +18,8 @@ class Vote < ActiveRecord::Base @@ -18,6 +18,8 @@ class Vote < ActiveRecord::Base
18 named_scope :with_voter_ids, lambda { |*args| {:conditions => {:voter_id=> args.first }} } 18 named_scope :with_voter_ids, lambda { |*args| {:conditions => {:voter_id=> args.first }} }
19 named_scope :active, :include => :choice, :conditions => { 'choices.active' => true } 19 named_scope :active, :include => :choice, :conditions => { 'choices.active' => true }
20 20
  21 + serialize :tracking
  22 +
21 after_create :update_winner_choice, :update_loser_choice 23 after_create :update_winner_choice, :update_loser_choice
22 24
23 def update_winner_choice 25 def update_winner_choice