Sha256: 72e1695f5ad246ebd27f6b5d599fdebc3f42da4324afc6b442b867a924ad1c90

Contents?: true

Size: 394 Bytes

Versions: 1

Compression:

Stored size: 394 Bytes

Contents

module Hive
  
  # Tracks communities.
  class Community < Base
    self.table_name = :hive_communities
    self.primary_key = :name
    
    has_many :posts, primary_key: :name, foreign_key: :community, inverse_of: :community_record
    has_many :post_tags, through: :posts
    has_many :members, primary_key: :name, foreign_key: :community
    has_many :accounts, through: :members
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hivemind-ruby-0.1.0 lib/hive/models/community.rb