<%= form_for @post do |f| %>
  <%= f.label :title %>
  <%= f.text_field :title %>

  <%= f.label :body %>
  <%= f.text_area :body %>

  <%= f.submit "Publish" %>
<% end %>

<div class="row">
  <div class="col-md-6 col-md-offset-3">
    <%= form_for @post do |f| %>
      <div class="form-group">
        <%= f.label :title %>
        <%= f.text_field :title, class: 'form-control' %>
      </div>

      <div class="form-group">
        <%= f.label :body %>
        <%= f.text_area :body, class: 'form-control' %>
      </div>

      <%= f.submit "Publish", class: "btn btn-primary" %>
    <% end %>
  </div>
</div>
Add CSS styles to post new form
Add CSS styles to post new form
