osem-fcy/app/serializers/speaker_serializer.rb
Andrew Kvalheim e01fd2d721 Add URLs to API responses
Resolves inability of API consumers to provide links to OSEM.
2023-03-04 10:15:56 -08:00

14 lines
294 B
Ruby

# frozen_string_literal: true
class SpeakerSerializer < ActiveModel::Serializer
include ActionView::Helpers::TextHelper
include Rails.application.routes.url_helpers
attributes :url, :name, :affiliation, :biography
delegate :name, to: :object
def url
url_for(object)
end
end