Sha256: b00af3fbad7845d254f81831701c70ca26b8a47ea9b0f44811bfdaabfd6f0681

Contents?: true

Size: 527 Bytes

Versions: 4

Compression:

Stored size: 527 Bytes

Contents

module Guts
  # Group model
  class Group < ActiveRecord::Base
    extend FriendlyId
    include TrackableConcern
    
    validates :title, presence: true, length: {minimum: 3}
    
    has_many :user_groups
    has_many :users, through: :user_groups
    has_many :media, as: :filable, dependent: :destroy
    has_many :metafields, as: :fieldable, dependent: :destroy
    has_many :tracks, as: :object
    
    friendly_id :title, use: [:slugged, :finders]
    trackable :create, :update, :destroy, fields: [:title]
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
guts-1.0.8 app/models/guts/group.rb
guts-1.0.7 app/models/guts/group.rb
guts-1.0.5 app/models/guts/group.rb
guts-1.0.3 app/models/guts/group.rb