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

Added Posts new page

parent 408fffc0
......@@ -7,6 +7,7 @@ class PostsController < ApplicationController
end
def new
@post = Post.new
end
def edit
......
<h1>Posts#new</h1>
<p>Find me in app/views/posts/new.html.erb</p>
<h1>New Post</h1>
<%= 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