0

Got my Kaminari working (after some setbacks) and I finally have my pagination done. After I tested it, I realized there where three dots being displayed after the last-page-arrow (error picture). I believe there's nothing weird with my kaminari code but I paste it below.

Kaminari config file:

Kaminari.configure do |config|
  config.default_per_page = 10
  # config.max_per_page = nil
  # config.window = 4
  # config.outer_window = 0
  # config.left = 0
  # config.right = 0
  # config.page_method_name = :page
  # config.param_name = :page
end

My view:

<%= paginate @array %>

My controller:

  def index
    @array = Kaminari.paginate_array(Group.all).page(params[:page])

    respond_with(@array)
  end

Not sure if this is important but i edited the Kaminari buttons because i'm not usigng fontawesome in my project, so i change the icons to bootstrap glyphicons.

2 Answers2

0

I'm posting the answer for some another newly coder like me. There's a file called _gap.html.erb which includes the dots when there're pages not being displeyed.

Don't know if someone will come across this, but it doesn't hurt to post it.

0

I know this is an older question but adding replacing what is in _gap.html.erb with the following code is a solid solution:

<li class='disabled'>
    <%= content_tag :a, raw(t 'views.pagination.truncate') %>  
</li>
cm1745
  • 120
  • 2
  • 12