application_serializer.rb 352 B

12345678910111213141516171819202122
  1. # frozen_string_literal: true
  2. class REST::ApplicationSerializer < ActiveModel::Serializer
  3. attributes :id, :name, :website, :redirect_uri,
  4. :client_id, :client_secret
  5. def id
  6. object.id.to_s
  7. end
  8. def client_id
  9. object.uid
  10. end
  11. def client_secret
  12. object.secret
  13. end
  14. def website
  15. object.website.presence
  16. end
  17. end