<h1>New post</h1>

<%= form_for(:post, :url => user_posts_path(@user)) do |f| %>
  <p>
    <b>User</b><br />
    <%= f.text_field :user_id %>
  </p>

  <p>
    <b>Title</b><br />
    <%= f.text_field :title %>
  </p>

  <p>
    <b>Body</b><br />
    <%= f.text_area :body %>
  </p>

  <p>
    <%= submit_tag "Create" %>
  </p>
<% end %>

<%= link_to 'Back', user_posts_path(@user) %>
