Sha256: 13e903a1a4c5aa27d4384883e5cc76e657762a2e24ec20a906cab47086dbefaf
Contents?: true
Size: 500 Bytes
Versions: 12
Compression:
Stored size: 500 Bytes
Contents
# frozen_string_literal: true module Lcms module Engine class MaterialSerializer < ActiveModel::Serializer attributes :anchors, :id, :identifier, :gdoc_url, :orientation, :pdf_url, :source_type, :subtitle, :title, :thumb_url, :pdf? delegate :anchors, :gdoc_url, :lesson, :orientation, :pdf_url, :source_type, :subtitle, :title, :thumb_url, to: :object def pdf? object.metadata['type'].casecmp('pdf').zero? end end end end
Version data entries
12 entries across 12 versions & 1 rubygems