Add communities and topics

This commit is contained in:
taitus
2017-08-07 12:51:49 +02:00
parent ee3b3f2c85
commit 43c17c3fc7
20 changed files with 210 additions and 10 deletions

4
app/models/topic.rb Normal file
View File

@@ -0,0 +1,4 @@
class Topic < ActiveRecord::Base
belongs_to :community
belongs_to :author, -> { with_hidden }, class_name: 'User', foreign_key: 'author_id'
end