Search code examples
ruby-on-railspaginationjquery-ui-sortableslim-langfootable

footable pagination not working properly using slim


I am using footable for an index page,I am using slim intead of html,but when I click on sorting icon in footable the pagination numbers increasing abrupty.

wrapper.wrapper-content.animated.fadeInRight
  .row
    .col-lg-12
      .ibox.float-e-margins
        .ibox-title
         h5 List of Organizations
        .ibox-content  
          table class="footable table table-stripped" data-page-size="10" 
           thead
            tr
             th Organization
             th Type
           tbody
            - @organizations.each do |f|
             tr
              td= f.name
              td= f.type   
           tfoot
            tr
             td colspan="2"
              ul class="pagination pull-right"
javascript:
$(function() {
$('.footable').footable();
});

before click on sort icon enter image description here after click on sort icon enter image description here

Am I done anything wrong, please let me know thanks in advance.


Solution

  • wrapper.wrapper-content.animated.fadeInRight
      .row
        .col-lg-12
          .ibox.float-e-margins
            .ibox-title
             h5 List of Organizations
            .ibox-content  
              table class="footable table table-stripped" data-page-size="10" 
               thead
                tr
                 th Organization
                 th Type
               tbody
                - @organizations.each do |f|
                 tr
                  td= f.name
                  td= f.type   
               tfoot
                tr
                 td colspan="2"
                  ul class="pagination pull-right"
    javascript:
      $(function() {
      $('.footable').footable();
      });