<%= provide(:header, "Seus exercícios") %>

<%= link_to "Criar novo exercício", new_exercise_path, class: "btn btn-primary pull-right" %>
<br></br>
<br></br>

<% @exercises.each do |exercise| %>
  <div class="box box-solid box-default">
    <div class="box-header">
      <h3 class="box-title"><%= exercise.title %></h></h3>
    </div><!-- /.box-header -->
    <div class="box-body">
      <%= truncate(exercise.description, length: 400, separator: ' ') %>
    </div><!-- /.box-body -->
    <div class="box-footer">
      <b>Possui <a href="#"><%= pluralize_questions(exercise.questions.count) %></a></b>
      <div class="pull-right">
        <%= link_to "Ver", exercise %> |
        <%= link_to "Excluir", exercise, method: :delete,
                    data: { confirm: "Tem certeza que deseja excluir?" } %>
      </div>
    </div>
  </div>
<% end %>

<%= provide(:header, "Seus exercícios") %>
<%= provide(:description, "Preview") %>

<%= link_to "Criar novo exercício", new_exercise_path, class: "btn btn-primary pull-right" %>
<br></br>
<br></br>

<% @exercises.each do |exercise| %>
  <div class="box box-solid box-default">
    <div class="box-header">
      <h3 class="box-title"><%= exercise.title %></h></h3>
    </div><!-- /.box-header -->
    <div class="box-body">
      <%= markdown(truncate(exercise.description, length: 200, separator: ' ')) %>
    </div><!-- /.box-body -->
    <div class="box-footer">
      <b>Possui <a href="#"><%= pluralize_questions(exercise.questions.count) %></a></b>
      <div class="pull-right">
        <%= link_to "Ver", exercise %> |
        <%= link_to "Editar", edit_exercise_path(exercise) %> |
        <%= link_to "Excluir", exercise, method: :delete,
                    data: { confirm: "Tem certeza que deseja excluir?" } %>
      </div>
    </div>
  </div>
<% end %>

Make display markdown in index view and add a link to edit the exercise
Make display markdown in index view and add a link to edit the exercise
