Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class User < ActiveRecord::Base
- has_many :registries
- has_many :viewers
- has_many :registries, :through => :viewers
- end
- class Registry < ActiveRecord::Base
- belongs_to :user
- has_many :viewers
- has_many :users, :through => :viewers
- end
- class Viewer < ActiveRecord::Base
- belongs_to :user
- belongs_to :registry
- end
Add Comment
Please, Sign In to add comment