osem-fcy/app/serializers/speaker_serializer.rb

15 lines
294 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2013-07-08 10:07:12 +02:00
class SpeakerSerializer < ActiveModel::Serializer
include ActionView::Helpers::TextHelper
include Rails.application.routes.url_helpers
2013-07-08 10:07:12 +02:00
attributes :url, :name, :affiliation, :biography
2013-07-08 10:07:12 +02:00
2017-05-21 21:02:30 +05:30
delegate :name, to: :object
def url
url_for(object)
end
2013-07-08 10:07:12 +02:00
end