Sha256: 953dd50829a089dfe996dd8d968d8537674ba1f860e9ea7d72ecc31d8091822d

Contents?: true

Size: 230 Bytes

Versions: 1

Compression:

Stored size: 230 Bytes

Contents

class BrainstormingIdeaVoteSerializer < ActiveModel::Serializer
  attributes :id, :idea_id, :user_id, :user_slug, :user_name

  def user_slug
    object.user.try(:slug)
  end
  
  def user_name
    object.user.try(:name)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
voluntary_brainstorming-0.0.2 app/serializers/brainstorming_idea_vote_serializer.rb