here

Ruby code posted
created at 19 Jun 23:27, updated at 24 Jun 20:49

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
class User < ActiveRecord::Base
  has_one :profile 
  has_and_belongs_to_many :channels, 
  :join_table => "channel_subscriptions"
  has_many :clips_owner,
  :class_name => "Clip",
  :foreign_key => "owner"
  has_many :ingested_from_user,
  :class_name => "Clip",
  :foreign_key => "ingested_from"
  has_many :channel_owner,
  :class_name => "Channel",
  :foreign_key => "owner"
  has_many :roles
  has_many :group_owner,
  :class_name => "Group",
  :foreign_key => "owner"
  has_many :channel_subscriptions

  before_save :validate_profile

  extend  MwActiveRecord::Class
  include MwActiveRecord::Instance


end
639 Bytes in 4 ms with coderay