openSUSE/osem

View on GitHub
app/serializers/speaker_serializer.rb

Summary

Maintainability
A
0 mins
Test Coverage
# 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