View difference between Paste ID: jAt4gmP0 and 5qEVPgQL
SHOW: | | - or go back to the newest paste.
1
<h1>Edit Post</h1>
2
<%= form_for @post do |f| %>
3
<p>
4
	<%= f.label :title %><br />
5
	<%= f.text_field :title %>
6
</p>
7
<p>
8
	<%= f.label :content %><br />
9
	<%= f.text_area :content %>
10
</p>
11
<p>
12
	<%= f.submit "Update" %>
13
</p>
14
<% end %>
15
16
17
<% @posts.each do |post| %>
18
	<h2><%= link_to post.title, post %></h2>
19
	<p><%= post.content %></p>
20
	<p><%= link_to "Edit", edit_post_path(post) %></p>
21
	<hr />
22
<% end %>