about summary refs log tree commit diff
path: root/app/serializers/rest/role_serializer.rb
blob: 5b81c6e0487c6c5f51d8cb36e5d155c6299f04e9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

class REST::RoleSerializer < ActiveModel::Serializer
  attributes :id, :name, :permissions, :color, :highlighted

  def id
    object.id.to_s
  end

  def permissions
    object.computed_permissions.to_s
  end
end