about summary refs log tree commit diff
path: root/app/models/poll_vote.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-03-04 22:51:23 +0100
committerEugen Rochko <eugen@zeonfederated.com>2019-03-04 22:51:23 +0100
commit833ffce2df68ae3b673e230fcb273da5d8c4681f (patch)
treef06854fd6b50c62897d9c25a9b50c21d93c894dd /app/models/poll_vote.rb
parent7a25bb858a2a7f3662d2ad2a8cba9ac7ea141aca (diff)
Store remote votes URI (#10158)
* Store remote votes URI

* Add spec for accepting remote votes

* Make poll vote id generation work the same way as follows
Diffstat (limited to 'app/models/poll_vote.rb')
-rw-r--r--app/models/poll_vote.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/poll_vote.rb b/app/models/poll_vote.rb
index 57781d616..aec678968 100644
--- a/app/models/poll_vote.rb
+++ b/app/models/poll_vote.rb
@@ -9,6 +9,7 @@
 #  choice     :integer          default(0), not null
 #  created_at :datetime         not null
 #  updated_at :datetime         not null
+#  uri        :string
 #
 
 class PollVote < ApplicationRecord
@@ -20,6 +21,8 @@ class PollVote < ApplicationRecord
 
   after_create_commit :increment_counter_cache
 
+  delegate :local?, to: :account
+
   private
 
   def increment_counter_cache