Sha256: 7383112cb9b08ad22628154b5eeed34ac6fbf5bf39d99f3f078a24c66603edd4
Contents?: true
Size: 535 Bytes
Versions: 7
Compression:
Stored size: 535 Bytes
Contents
# This object just holds an asset file # There is a single `global` ck asset in which we use for the ckeditor uploads form module Effective class CkAsset < ActiveRecord::Base self.table_name = EffectiveRegions.ck_assets_table_name.to_s # Only the global one has_many_attached :files # The instance ones will have just one file has_one_attached :file # Attributes # global :boolean def self.global CkAsset.where(global: true).first || CkAsset.create!(global: true) end end end
Version data entries
7 entries across 7 versions & 1 rubygems