peimelo/controlled_health_api

View on GitHub
app/serializers/accounts_serializer.rb

Summary

Maintainability
A
0 mins
Test Coverage
C
75%
class AccountsSerializer < ActiveModel::Serializer
  attributes :id, :name, :is_owner

  def is_owner
    object.owner == current_api_user
  end
end