mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-26 20:56:48 +00:00
18 lines
340 B
Ruby
18 lines
340 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Api
|
|
module Admin
|
|
class EnterpriseRoleSerializer < ActiveModel::Serializer
|
|
attributes :id, :user_id, :enterprise_id, :user_email, :enterprise_name
|
|
|
|
def user_email
|
|
object.user.email
|
|
end
|
|
|
|
def enterprise_name
|
|
object.enterprise.name
|
|
end
|
|
end
|
|
end
|
|
end
|