forked from bofh/fetsite
AutoCommit Fre Jul 31 10:03:05 CEST 2015
This commit is contained in:
@@ -13,6 +13,7 @@ class Survey::Question < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def do_answer(choice_ids, user)
|
||||
unless user.nil?
|
||||
cid=choice_ids.map{|c|c.to_i}
|
||||
unless cid.empty?
|
||||
Survey::Answer.where(user_id: user.id, choice_id: self.choice_ids).delete_all
|
||||
@@ -25,4 +26,5 @@ class Survey::Question < ActiveRecord::Base
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user