Fixed issue with poll vote counts not showing

• Fixed:
- issue with poll vote counts not showing by not including !hide_totals? in poll.rb
This commit is contained in:
mgabdev
2020-12-22 23:46:43 -05:00
parent 4f5d0f1b96
commit 0a4c31d39e
3 changed files with 6 additions and 8 deletions

View File

@@ -4,7 +4,7 @@ class REST::PollSerializer < ActiveModel::Serializer
attributes :id, :expires_at, :expired,
:multiple, :votes_count
has_many :loaded_options, key: :options
has_many :loaded_options, key: :options, serializer: REST::PollOptionSerializer
has_many :emojis, serializer: REST::CustomEmojiSerializer
attribute :voted, if: :current_user?
@@ -25,7 +25,4 @@ class REST::PollSerializer < ActiveModel::Serializer
!current_user.nil?
end
class OptionSerializer < ActiveModel::Serializer
attributes :title, :votes_count
end
end