Commit 55041d0fc74b7ceaf5139775f0be6d48c3cc02d6

Authored by Luke Baker
1 parent 96d00c4e

handle force_invalid_vote parameter on skips

Showing 1 changed file with 5 additions and 0 deletions   Show diff stats
app/models/visitor.rb
... ... @@ -67,6 +67,11 @@ class Visitor < ActiveRecord::Base
67 67 associate_appearance = true
68 68 end
69 69  
  70 + if options.delete(:force_invalid_vote)
  71 + options.merge!(:valid_record => false)
  72 + options.merge!(:validity_information => "API call forced invalid vote")
  73 + end
  74 +
70 75 options.merge!(:question_id => prompt.question_id, :prompt_id => prompt.id, :skipper_id => self.id)
71 76 prompt_skip = skips.create!(options)
72 77 if associate_appearance
... ...