Sha256: 752f460c1b4883b2a6613e611135eacf30f0b37e36f5fba8ea44e2c9d53960e5
Contents?: true
Size: 722 Bytes
Versions: 29
Compression:
Stored size: 722 Bytes
Contents
module Spree module Api module V2 module Platform class DigitalSerializer < BaseSerializer set_type :digital attribute :url do |digital| url_helpers = Rails.application.routes.url_helpers url_helpers.polymorphic_url(digital.attachment, only_path: true) end attribute :content_type do |digital| digital.attachment.content_type.to_s end attribute :filename do |digital| digital.attachment.filename.to_s end attribute :byte_size do |digital| digital.attachment.byte_size.to_i end belongs_to :variant end end end end end
Version data entries
29 entries across 29 versions & 3 rubygems