Let\'s say I have a comment model:
class Comment < ActiveRecord::Base has_many :replies, class: \"Comment\", foreign_key: \"reply_id\" end
It seems like you need a self-referential association. Check out the following railscast: http://railscasts.com/episodes/163-self-referential-association