Commit f1b29c4cdecb86a4a5e2c1d8a8c4db25d15a2a33
1 parent
1969c03c
Exists in
master
and in
1 other branch
check for force_invalid_vote parameter
Showing
1 changed file
with
5 additions
and
0 deletions
Show diff stats
app/models/visitor.rb
@@ -32,6 +32,11 @@ class Visitor < ActiveRecord::Base | @@ -32,6 +32,11 @@ class Visitor < ActiveRecord::Base | ||
32 | end | 32 | end |
33 | end | 33 | end |
34 | 34 | ||
35 | + if options.delete(:force_invalid_vote) | ||
36 | + options.merge!(:valid_record => false) | ||
37 | + options.merge!(:validity_information => "API call forced invalid vote") | ||
38 | + end | ||
39 | + | ||
35 | associate_appearance = false | 40 | associate_appearance = false |
36 | if options[:appearance_lookup] | 41 | if options[:appearance_lookup] |
37 | @appearance = prompt.appearances.find_by_lookup(options.delete(:appearance_lookup)) | 42 | @appearance = prompt.appearances.find_by_lookup(options.delete(:appearance_lookup)) |