5. Better Buttons and Forms

###app/views/posts/index.html.erb

...
<table class="table">
...
<td><%= link_to 'Show', post, class: 'btn btn-info' %></td>
<td><%= link_to 'Edit', edit_post_path(post), class: 'btn btn-warning' %></td>
<td><%= link_to 'Destroy', post, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger' %></td>
...
<%= link_to 'New Post', new_post_path, class: 'btn btn-primary' %>

###app/views/posts/_form.html.erb

...
<div class="field form-group">
  <%= f.label :title %><br>
  <%= f.text_field :title, class: 'form-control' %>
</div>
<div class="field form-group">
  <%= f.label :body %><br>
  <%= f.text_area :body, class: 'form-control' %>
</div>
<div class="actions form-group">
  <%= f.submit %>
</div>
...


Complete and Continue