Sha256: 36349e4700e829eb6479adef3d46e471d209057da4376d6ca7ec72e99ad8826e
Contents?: true
Size: 829 Bytes
Versions: 26
Compression:
Stored size: 829 Bytes
Contents
module Cmor module Carousels class ItemDetail < ApplicationRecord include ActsAsPublished::ActiveRecord include Markup::Rails::ActiveRecord belongs_to :carousel belongs_to :asset, class_name: 'ActiveStorage::Attachment', dependent: :destroy acts_as_list scope: :carousel acts_as_markup :description, Cmor::Core::Configuration.default_markup_options def human "#{carousel.class.model_name.human} #{carousel.human} - #{self.class.model_name.human} #{id}" end module ContentTypesConcern extend ActiveSupport::Concern def video? asset.content_type.start_with?('video/') end def image? asset.content_type.start_with?('image/') end end include ContentTypesConcern end end end
Version data entries
26 entries across 26 versions & 1 rubygems