first commit

This commit is contained in:
Sabic
2024-08-07 16:43:33 +02:00
commit f3b67b0800
111 changed files with 1993 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
<% unless comment.archived? %>
<p>
<strong>Commenter:</strong>
<%= comment.commenter %>
</p>
<p>
<strong>Comment:</strong>
<%= comment.body %>
</p>
<p>
<%= link_to "Destroy Comment", [comment.article, comment], data: {
turbo_method: :delete,
turbo_confirm: "Are you sure?"
} %>
</p>
<% end %>

View File

@@ -0,0 +1,17 @@
<%= form_with model: [ @article, @article.comments.build ] do |form| %>
<p>
<%= form.label :commenter %><br>
<%= form.text_field :commenter %><br>
</p>
<p>
<%= form.label :body %><br>
<%= form.text_area :body %><br>
</p>
<p>
<%= form.label :status %><br>
<%= form.select :status, Visible::VALID_STATUSES, selected: 'public' %><br>
</p>
<p>
<%= form.submit %><br>
</p>
<% end %>