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