Sha256: 59d640fa17d1feb19a9f91d129c6091fd738fa35691a9bc60564f087a69a1664

Contents?: true

Size: 603 Bytes

Versions: 3

Compression:

Stored size: 603 Bytes

Contents

class ChannelSerializer < ActiveModel::Serializer
  has_one :user

  def url
    dune.channel_url(object.id)
  end

  def html_url
    main_app.channels_profile_url(object, subdomain: object.permalink)
  end

  attributes :id,
   :name,
   :description,
   :permalink,
   :created_at,
   :updated_at,
   :image,
   :video_embed_url,
   :video_url,
   :how_it_works,
   :how_it_works_html,
   :terms_url,
   :state,
   :user_id,
   :accepts_projects,
   :submit_your_project_text,
   :submit_your_project_text_html,
   :start_content,
   :start_hero_image,
   :success_content,
   :url,
   :html_url
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dune-api-1.1.0 app/serializers/channel_serializer.rb
dune-api-1.0.2 app/serializers/channel_serializer.rb
dune-api-1.0.1 app/serializers/channel_serializer.rb