Sha256: 7abe862f1afc0a809722f2b5a845f23c173619d44b0b30171b0c265fb75a4ddc

Contents?: true

Size: 379 Bytes

Versions: 4

Compression:

Stored size: 379 Bytes

Contents

# frozen_string_literal: true

module Lcms
  module Engine
    class SocialThumbnail < ActiveRecord::Base
      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

4 entries across 4 versions & 1 rubygems

Version Path
lcms-engine-0.1.4 app/models/lcms/engine/social_thumbnail.rb
lcms-engine-0.1.3 app/models/lcms/engine/social_thumbnail.rb
lcms-engine-0.1.2 app/models/lcms/engine/social_thumbnail.rb
lcms-engine-0.1.0 app/models/lcms/engine/social_thumbnail.rb