RBOnRails-learning/app/views/comments/_form.html.erb

17 lines
465 B
Plaintext
Raw Normal View History

2024-08-07 14:43:33 +00:00
<%= 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 %>