Add posts test
This commit is contained in:
parent
0df07c478a
commit
76229c8cc5
17 changed files with 278 additions and 0 deletions
16
app/views/posts/index.html.erb
Normal file
16
app/views/posts/index.html.erb
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<p style="color: green"><%= notice %></p>
|
||||
|
||||
<% content_for :title, "Posts" %>
|
||||
|
||||
<h1>Posts</h1>
|
||||
|
||||
<div id="posts">
|
||||
<% @posts.each do |post| %>
|
||||
<%= render post %>
|
||||
<p>
|
||||
<%= link_to "Show this post", post %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= link_to "New post", new_post_path %>
|
||||
Loading…
Add table
Add a link
Reference in a new issue