yooo this is sick
This commit is contained in:
@@ -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 %>
|
||||
Reference in New Issue
Block a user