ruby on rails 3.2 - bootstrap nav tabs with will_paginate pagination in each tab -
when put will_paginate paginated lists twitter bootstrap tabs. lists them way out pagination links in between. i'm using will_paginate-bootstrap style pagination.
i tried without making tabs work:
taking out pagination styling
removing pagination blocks
if remove ruby tabs work, they're working independently
<div class="tabbable"> <ul class="nav nav-tabs"> <li class="active"><a href="#a" data-toggle="tab">newest</a></li> <li><a href="#b" data-toggle="tab">activity</a></li> </ul> <div class="tab-content"> <div class="tab-pane active" id="a"> <%= render partial: "posts/post", collection: @posts, as: :post %> <%= will_paginate @posts, renderer: bootstrappagination::rails %> </div> <div class="tab-pane" id="b"> <%= render partial: "posts/post", collection: @posts_by_activity, as: :post %> <%= will_paginate @posts_by_activity, renderer: bootstrappagination::rails %> </div> </div> </div>
which version of rails using? i'm using 3.2.17 , i'm having issues of own bootstrap 3 tabs , will_paginate, not same sound of it.
this i'm doing:
<ul class="nav nav-tabs"> <li class="active"><a href="#announcements" data-toggle="tab"><i class="fa fa-exclamation-circle"></i> announcements</a></li> <li><a href="#activity" data-toggle="tab"><i class="fa fa-bar-chart-o"></i> site activity</a></li> </ul> <div class="tab-content"> <div class="tab-pane fade in active" id="announcements"> <%= render 'announcements' %> </div> <div class="tab-pane fade" id="activity"> <%= render 'activity' %> </div> </div>
and have the:
<%= will_paginate @announcements, renderer: bootstrappagination::rails %>
bit of on each of partials. me, partials different info, i've got instance variables in features#index controller action each one. have tried making separate partial each see if works?
the pagination navigation working expected, however, clicking on page of content adds ?page=# query string:
http://localhost:3000/features?page=2
and applies both tabs. if wanted see page 2 of announcements tab, clicking on site activity tab goes right page 2, also, since query string doesn't ever change. annoying.
Comments
Post a Comment