Commit 9579015b88a2beb1e904757bcf69936a8f861229

Authored by Luke Baker
2 parents 2e9e5c92 46ea7e43

Merge branch 'master' into atomic-appearance-updates

app/models/choice.rb
@@ -40,7 +40,7 @@ class Choice < ActiveRecord::Base @@ -40,7 +40,7 @@ class Choice < ActiveRecord::Base
40 if self.changed.include?('active') && self.active? 40 if self.changed.include?('active') && self.active?
41 self.question.mark_prompt_queue_for_refill 41 self.question.mark_prompt_queue_for_refill
42 if self.question.choices.size - self.question.inactive_choices_count > 1 && self.question.uses_catchup? 42 if self.question.choices.size - self.question.inactive_choices_count > 1 && self.question.uses_catchup?
43 - self.question.send_later :add_prompt_to_queue 43 + self.question.delay.add_prompt_to_queue
44 end 44 end
45 end 45 end
46 end 46 end
app/models/question.rb
@@ -83,7 +83,7 @@ class Question < ActiveRecord::Base @@ -83,7 +83,7 @@ class Question < ActiveRecord::Base
83 else 83 else
84 record_prompt_cache_hit 84 record_prompt_cache_hit
85 end 85 end
86 - self.send_later :add_prompt_to_queue 86 + self.delay.add_prompt_to_queue
87 return next_prompt 87 return next_prompt
88 else 88 else
89 #Standard choose prompt at random 89 #Standard choose prompt at random
spec/integration/questions_spec.rb
@@ -83,7 +83,7 @@ describe "Questions" do @@ -83,7 +83,7 @@ describe "Questions" do
83 response.body.should have_tag("question", @questions.size) 83 response.body.should have_tag("question", @questions.size)
84 votes.each_value do |vs| 84 votes.each_value do |vs|
85 count = vs.select{|v| v.created_at > date}.size 85 count = vs.select{|v| v.created_at > date}.size
86 - response.body.should have_tag"recent-votes", :text => count 86 + response.body.should have_tag("recent-votes", :text => count)
87 end 87 end
88 end 88 end
89 89
test/factories/density.rb
1 Factory.define :density do |density| 1 Factory.define :density do |density|
2 density.question_id 2 density.question_id
3 density.value 3 density.value
4 - density.type { 'string' } 4 + density.class { 'string' }
5 end 5 end