Sha256: 741e67f4160f03854caf9c22cc6105bc6685fcbf9f404f42c87c1f42eda06fd4
Contents?: true
Size: 553 Bytes
Versions: 12
Compression:
Stored size: 553 Bytes
Contents
module Cmor::Files class FileDetail < ApplicationRecord belongs_to :folder belongs_to :asset, class_name: 'ActiveStorage::Attachment', dependent: :destroy # acts as published include ActsAsPublished::ActiveRecord acts_as_published # acts as list acts_as_list scope: :folder default_scope { order(folder_id: :desc, position: :asc) } # slugs extend FriendlyId friendly_id :title, use: :slugged validates :identifier, uniqueness: { scope: [ :folder_id ] }, allow_blank: true, allow_nil: true end end
Version data entries
12 entries across 12 versions & 1 rubygems