anchor.diff:          ...
         </div>
         <div class="modal-footer">
  -        <button type="button" class="btn btn-primary js-pager" data-id="<%= @plan.id %>">Previous</button>
  +        <button type="button" class="btn btn-primary js-pager" data-id="<%= @plan.id %>" data-count="<%= current_user.past_plans.count %>">Previous</button>
           <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
         </div>
       </div>
  
positive.code: $(function () {
    $(".js-previous").on("click", function() {
      var nextId = parseInt($(".js-previous").attr("data-id")) - 1;
      $.get("/plans/" + nextId + ".json", function(data) {
        var date = new Date(data["date"]);
        var month = [];
  
negative.code:   <h4>Income still available: <strong><%= number_to_currency(@plan.income_available) %></strong></h4>
    <small><%= link_to "Edit income", edit_plan_path %></small>
  </div>
  
  <!-- Button trigger modal -->
  <button type="button" class="btn btn-default js-previous" data-toggle="modal" data-target="#myModal" data-id="<%= @plan.id %>">
    Previous plans
  