moved javascript to body since it does not work with turbolinks
on each click on a tab refresh pagination