1
0

role_serializer.rb 245 B

12345678910111213
  1. # frozen_string_literal: true
  2. class REST::RoleSerializer < ActiveModel::Serializer
  3. attributes :id, :name, :permissions, :color, :highlighted
  4. def id
  5. object.id.to_s
  6. end
  7. def permissions
  8. object.computed_permissions.to_s
  9. end
  10. end