Sha256: 3c3bf73e2a9d30cdd75fef33efc49acecd8ef551c248f2db71f7c522f2eeaf8d

Contents?: true

Size: 529 Bytes

Versions: 11

Compression:

Stored size: 529 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

11 entries across 11 versions & 1 rubygems

Version Path
guts-1.3.5 app/models/guts/group.rb
guts-1.3.4 app/models/guts/group.rb
guts-1.3.3 app/models/guts/group.rb
guts-1.3.2 app/models/guts/group.rb
guts-1.3.1 app/models/guts/group.rb
guts-1.3.0 app/models/guts/group.rb
guts-1.2.2 app/models/guts/group.rb
guts-1.2.1 app/models/guts/group.rb
guts-1.2.0 app/models/guts/group.rb
guts-1.1.1 app/models/guts/group.rb
guts-1.1.0 app/models/guts/group.rb