This is a tutorial about building a simple comment and reply system with Ruby on Rails. I was looking for a way to build this without a gem. Most t...
For further actions, you may consider blocking this person and/or reporting abuse
hello such great idea but i got the problem below with some part of your code
ee
m
mm
l
l
these particular problem is just when i hit the reply link
NoMethodError in Comments#new
Showing E:/Projects/app/app/views/comments/_form.html.erb where line #1 raised:
undefined method `comments_path' for #ActionView::Base:0x00000000026a70
Did you mean? font_path
Extracted source (around line #1):
<%= form_with(model: comment, local: true) do |form| %>
<% if comment.errors.any? %>
<%= pluralize(comment.errors.count, "error") %> prohibited this comment from being saved:
@wcurzor my suggestion is to start looking over the Replies section of the article to see if you have everything as the article. One thing to check if you have the
remote: true
set in the file below. That would be the only "gotcha" that I can see.Here is the completed app.
Thank you @wcurzor As for the error, I will look into it.
i wanted to convert whole system to ajax firstly the comment field is not getting empty after reply and the replies to comments are not showing on the page at first but when i refresh the page they are shown
any idea on how to reply the reply button with a form using turbo_frames in rails rails 7
I will need to revise this post to use turbo. Sorry don’t have the answer right now.
recent