mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
28 lines
487 B
Text
28 lines
487 B
Text
<p>
|
|
<strong>Title:</strong>
|
|
<%= @post.title %>
|
|
</p>
|
|
|
|
<p>
|
|
<strong>Text:</strong>
|
|
<%= @post.text %>
|
|
</p>
|
|
|
|
|
|
<h2>Add a comment:</h2>
|
|
<%= form_for([@post, @post.comments.build]) do |f| %>
|
|
<p>
|
|
<%= f.label :commenter %><br />
|
|
<%= f.text_field :commenter %>
|
|
</p>
|
|
<p>
|
|
<%= f.label :body %><br />
|
|
<%= f.text_area :body %>
|
|
</p>
|
|
<p>
|
|
<%= f.submit %>
|
|
</p>
|
|
<% end %>
|
|
|
|
<%= link_to 'Edit Post', edit_post_path(@post) %> |
|
|
<%= link_to 'Back to Posts', posts_path %>
|