Skip to content

Commit

Permalink
add voting category name to shrimpo serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
mcfiredrill committed Sep 13, 2024
1 parent ce9022a commit 650f601
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/serializers/shrimpo_vote_serializer.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
class ShrimpoVoteSerializer < ActiveModel::Serializer
attributes :score
attributes :score, :voting_category_name
belongs_to :user
belongs_to :shrimpo_entry
belongs_to :shrimpo_voting_category

def voting_category_name
object.shrimpo_voting_category.name
end
end

0 comments on commit 650f601

Please sign in to comment.