Hi I’m implementing a forum with nested post threads (reddit style)
threads and comments can be voted on. threads can be tagged threads have
titles, comment don’t my views will usually need to generate only a
subset of 3 levels of the whole comment tree.
i’m wondering if I should create a separate and table model for threads,
or use only table where root = 0 if it’s a thread record
in the latter option i’m thinking of creating a tabless model which will
represent a thread (the id will be the id of the root comment
what will be the easiest way to implement it ?
this is what i’m thinking about the second option. what relations should
thread and post have ? should thread be a resource?
attr_accessor :root_post_id, :depth
class Post < ActiveRecord::Base
#belongs_to :thread ???