From 8162c80735da8a947a48c31f1812b6258b89900e Mon Sep 17 00:00:00 2001 From: Pius Uzamere Date: Fri, 4 Dec 2009 12:11:32 -0500 Subject: [PATCH] quick refactor --- app/models/choice.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/choice.rb b/app/models/choice.rb index 5c8e544..5d35be4 100644 --- a/app/models/choice.rb +++ b/app/models/choice.rb @@ -71,9 +71,9 @@ class Choice < ActiveRecord::Base #do this in a new process (via delayed jobs) previous_choices = (self.question.choices - [self]) return if previous_choices.empty? - for c in previous_choices + previous_choices.each { |c| question.prompts.create!(:left_choice => c, :right_choice => self) question.prompts.create!(:left_choice => self, :right_choice => c) - end + } end end -- libgit2 0.21.2