NoMethodError at /comments/12/comments undefined method `comment_url' for #<Comments::CommentsController:0x00000000025e18> Did you mean? comment_comment_url
http://localhost:3000/comments/9/comments
@_params | #<ActionController::Parameters {"authenticity_token"=>"======", "comment"=> #<ActionController::Parameters {"content"=>"nice"} permitted: false>, "commit"=>"Create Comment", "controller"=>"comments/comments", "action"=>"create", "comment_id"=>"10"} permitted: false> @ransack_items | Ransack::Search<class: Item, base: Grouping <combinator: and>> @commentable | #<Comment id: 10, user_id: nil, commentable_type: "Comment", commentable_id: 9, content: nil, created_at: "-0000", updated_at: "20000"> @current_user | #<User id: 1, email: "admin@gmail.com", created_at: "0000", updated_at: "0000-", first_name: "Admin", last_name: "Man", slug: "admin-man"> @comment | #<Comment id: 12, user_id: 1, commentable_type: "Comment", commentable_id: 10, content: "nice", created_at: "-0000", updated_at: "0000"> Request parameters | {"authenticity_token"=>"=====", "comment"=>{"content"=>"nice"}, "commit"=>"Create Comment", "controller"=>"comments/comments", "action"=>"create", "comment_id"=>"10"}
#controllers/items/comments_controller.rb @commentable = Item.friendly.find(params[:item_id]) #routes.rb resources :items do resources :comments, only: %i[new create destroy], module: :items end