From d5f35d812473ff11a4923814ca190e6a72c9bd12 Mon Sep 17 00:00:00 2001 From: Luke Baker Date: Mon, 3 Jun 2013 10:27:33 -0400 Subject: [PATCH] update vote create options to include objects --- app/models/visitor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/visitor.rb b/app/models/visitor.rb index af3cbd2..7ee67c3 100644 --- a/app/models/visitor.rb +++ b/app/models/visitor.rb @@ -48,7 +48,7 @@ class Visitor < ActiveRecord::Base other_choices = prompt.choices - [choice] loser_choice = other_choices.first - options.merge!(:question_id => prompt.question_id, :prompt_id => prompt.id, :voter_id=> self.id, :choice_id => choice.id, :loser_choice_id => loser_choice.id) + options.merge!(:question_id => prompt.question_id, :prompt => prompt, :voter => self, :choice => choice, :loser_choice => loser_choice) v = votes.create!(options) safely_associate_appearance(v, @appearance) if associate_appearance -- libgit2 0.21.2