Sha256: 89800591ec3c89156cb9068d43db596d2987ebbd049c8a0b9d07685ea7087b25

Contents?: true

Size: 378 Bytes

Versions: 12

Compression:

Stored size: 378 Bytes

Contents

# frozen_string_literal: true

module Lcms
  module Engine
    class SocialThumbnail < ApplicationRecord
      MEDIAS = %w(all facebook pinterest twitter).freeze

      mount_uploader :image, SocialThumbnailUploader

      belongs_to :target, polymorphic: true

      validates :target, :media, presence: true
      validates :media, inclusion: { in: MEDIAS }
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
lcms-engine-0.5.5 app/models/lcms/engine/social_thumbnail.rb
lcms-engine-0.5.4 app/models/lcms/engine/social_thumbnail.rb
lcms-engine-0.5.3 app/models/lcms/engine/social_thumbnail.rb
lcms-engine-0.5.2 app/models/lcms/engine/social_thumbnail.rb
lcms-engine-0.5.1 app/models/lcms/engine/social_thumbnail.rb
lcms-engine-0.5.0 app/models/lcms/engine/social_thumbnail.rb
lcms-engine-0.4.2 app/models/lcms/engine/social_thumbnail.rb
lcms-engine-0.4.1 app/models/lcms/engine/social_thumbnail.rb
lcms-engine-0.4.0 app/models/lcms/engine/social_thumbnail.rb
lcms-engine-0.3.1 app/models/lcms/engine/social_thumbnail.rb
lcms-engine-0.3.0 app/models/lcms/engine/social_thumbnail.rb
lcms-engine-0.2.0 app/models/lcms/engine/social_thumbnail.rb