Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Post < ApplicationRecord
- has_many :replies, class_name: "Post",
- foreign_key: :thread_id
- belongs_to :thread, class_name: "Post"
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement