class Comments < ActiveRecord::Base
belongs_to :post
end
rails generate migration CreateComments body:text post:references
Then run this command in the terminal to create your comments table in the database:
rake db:migrate
class Comments < ActiveRecord::Base
belongs_to :post
end
rails generate migration CreateComments body:text post:references
Then run this command in the terminal to create your comments table in the database:
rake db:migrate