Sha256: f05749f855fdc26a3b1a5f8df5f8afcf48aa0ea845e5f586c832bbd4c5d6c70e
Contents?: true
Size: 835 Bytes
Versions: 5
Compression:
Stored size: 835 Bytes
Contents
module Guts # Content model class Content < ActiveRecord::Base extend FriendlyId include NavigatableConcern include TrackableConcern include MultisiteScopeConcern validates :type, presence: true validates :title, presence: true, length: { minimum: 3 } belongs_to :site belongs_to :type belongs_to :user, required: false has_many :categorizations has_many :categories, through: :categorizations has_many :media, as: :filable, dependent: :destroy has_many :metafields, as: :fieldable, dependent: :destroy has_many :tracks, as: :object friendly_id :title, use: [:slugged, :scoped, :finders], scope: :site_id navigatable :'type.title', :title, format: '[:type.title] :title' trackable :create, :update, :destroy, fields: [:title, :visible, :tags, :slug] end end
Version data entries
5 entries across 5 versions & 1 rubygems