Commit 8a518714 authored by John Noel's avatar John Noel

Added Posts new page

parent 408fffc0
...@@ -7,6 +7,7 @@ class PostsController < ApplicationController ...@@ -7,6 +7,7 @@ class PostsController < ApplicationController
end end
def new def new
@post = Post.new
end end
def edit def edit
......
<h1>Posts#new</h1> <h1>New Post</h1>
<p>Find me in app/views/posts/new.html.erb</p>
<%= simple_form_for @post do |f| %>
<%= f.input :title %>
<%= f.input :content %>
<%= f.button :submit, "Post", class: "btn btn-primary" %>
<%= link_to "Back", posts_path, class: "btn btn-default" %>
<% end %>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment