Assumptions: The application already exists. You have two models article.rb
and comment.rb
. Articles have two attributes, title
and text
. Comments have two attributes, text
and article_id
. See these instructions if you need help getting started.
Assuming that you are nesting your :comments
resources inside of :articles
, mount ActionCable
and make sure you have a root.
config/routes.rb
Rails.application.routes.draw do