<%= form_for( (@review == nil ? [@course, @course.reviews.build] : [@course, @review]) ) do |f| %>
  <div class="form-group">
    <p>
      <%= f.label :rating %> <br>
      <%= f.number_field :rating, class: 'form-control', id: 'form_review_rating', in: 0..5, step: 1 %>
    </p>

    <p>
      <%= f.label :grade %> <br>
      <%= f.collection_select :grade, Review::GRADES, :to_s, :to_s, { include_blank: true }, { class: 'form-control dropdown', id: 'form_review_grade' } %>
    </p>

    <p>
      <%= f.label :info %> <br>
      <%= f.text_field :info, placeholder: "Taken Fall 2015 | Professor: Charles Xavier", class: 'form-control', id: 'form_review_info' %>
    </p>

    <p>
      <%= f.label :review_text %> <br>
      <%= f.text_area :review_text, placeholder: 'Write review here...', class: 'form-control', id: 'form_review_text' %>
    </p>

    <br>
    <p><%= f.submit 'Submit', class: 'btn btn-default' %></p>
  </div>
<% end %>

<%= form_for( (@review == nil ? [@course, @course.reviews.build] : [@course, @review]) ) do |f| %>
  <div class="form-group">
    <p>
      <%= f.label :rating %> <br>
      <%= f.number_field :rating, class: 'form-control', id: 'form_review_rating', in: 0..5, step: 1 %>
    </p>

    <p>
      <%= f.label :grade %> <br>
      <%= f.collection_select :grade, Review::GRADES, :to_s, :to_s, { include_blank: true }, { class: 'form-control dropdown', id: 'form_review_grade' } %>
    </p>

    <p>
      <%= f.label :info %> <br>
      <%= f.text_field :info, placeholder: "Taken Fall 2015 | Professor: Charles Xavier", class: 'form-control', id: 'form_review_info' %>
    </p>

    <p>
      <%= f.label :review_text %> <br>
      <%= f.text_area :review_text, placeholder: 'Write review here...', class: 'form-control', id: 'form_review_text' %>
    </p>

    <br>
    <p><%= f.submit 'Submit', class: 'btn btn-default btn-primary' %> |
      <% if @review == nil %>
        <a href="javascript:toggle('reviews_form')", class="btn btn-default btn-danger">Cancel</a>
      <% else %>
        <%= link_to 'Cancel', course_path(@course), class: 'btn btn-default btn-danger'%>
      <% end %>
  </p>
  </div>
<% end %>

Add cancel btn & btn bootstrap
Add cancel btn & btn bootstrap
