daily pastebin goal
94%
SHARE
TWEET

Untitled

a guest Jul 12th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class User < ActiveRecord::Base
  2.   has_one :preferences
  3.   has_many :projects
  4.   has_many :branches
  5.   has_many :documents
  6.   has_many :annotations
  7.   has_many :comments
  8.   has_many :micro_messages
  9.   has_many :micro_message_project_subscriptions
  10.   has_many :subscribed_projects, :through => :micro_message_project_subscriptions, :source => :project
  11. end
  12.  
  13.  
  14.  
  15. class Project < ActiveRecord::Base
  16.   belongs_to :user
  17.   has_many :branches
  18.   has_many :micro_messages
  19.   has_many :micro_message_project_subscriptions
  20.   has_many :subscribed_users, :through => :micro_message_project_subscriptions, :source => :user
  21. end
  22.  
  23.  
  24.  
  25.  
  26. class MicroMessageProjectSubscriptions < ActiveRecord::Base
  27.   belongs_to :user
  28.   belongs_to :project
  29. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top