Home>

I am implementing the comment function, but when I try to send a comment, it is not saved and a routing error occurs.

prototypes controller
class PrototypesController</pre>
<pre><code>comments_controller.rb
class CommentsController</pre>
<pre><code>routes.rb
Rails.application.routes.draw do
  devise_for: users
  root to: "prototypes # index"
  resources: prototypes, only: [: index,: new,: create,: show,: edit,: update,: destroy]
  resources: comments, only: [: create,: show]
end


What I tried
I checked if there is a double-byte space in the description of routes.rb.