Trying to create a comment section with rich_text_area in Rails 7, but the form is not rendering

Viewed 15

So I've gotten everything to work in regards to the functionality of the comment system. The only thing left is the text area itself. When I hit the submit button, a comment appears where it should but since I can't type anything, it's just an empty comment. I'm new to Rails so any help is much appreciated.

Here is my code

_form.html.erb

<%= form_with(model: [post, post.comments.build]) do |f| %>
  <div class="form-control">
    <%= f.rich_text_area :body %>
    <%= f.submit "Reply", class: "btn btn-primary mt-1" %>
  </div>
<% end %>

What it looks like

enter image description here

What it should look like

enter image description here

0 Answers
Related