I\'m very new to Ruby on Rails and learning while trying to fix some bugs on my company website. I\'m trying to paginate a collection of records combined with a particular a
I do not have direct experience with it. However, this link shows a way. I could not test but you can certainly do.
<%= will_paginate @posts, :params => {:anchor => i} %>
If this works, then you can utilize this way in your helper:
def page_navigation_links(pages, param_name=:page)
will_paginate(pages, :params => {:anchor => "#ANCHOR"}, :class => 'pagination', :inner_window => 2, :outer_window => 0, :renderer => BootstrapHelper::LinkRenderer, :previous_label => '←'.html_safe, :next_label => '→'.html_safe, :param_name => param_name)
end
You can replace #ANCHOR
as you need.