Sha256: 6bce46210802f23c3b829498ef64c220c2029a4bebaf3e9b76956760d055b26b

Contents?: true

Size: 283 Bytes

Versions: 1

Compression:

Stored size: 283 Bytes

Contents

class CommunitySerializer < ActiveModel::Serializer
  attributes :id, :organization_id, :organization_slug, :organization_name, :name, :slug, :text

  def organization_slug
    object.organization.try(:slug)
  end

  def organization_name
    object.organization.try(:name)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
voluntary_feedback-0.1.0 app/serializers/community_serializer.rb