yooo this is sick

This commit is contained in:
2024-08-08 11:19:44 +02:00
parent ffc09cabc4
commit aa0811e25d
22 changed files with 226 additions and 33 deletions

View File

@@ -1,17 +1,18 @@
<%= 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>
<% if logged_in? %>
<%= form_with model: [ @article, @article.comments.build ] do |form| %>
<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 %>
<% else %>
<%= link_to "Sign up", signup_path %> or
<%= link_to "Log in", login_path %>
<% end %>