You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# Time 2015-01-30 17:04:12
# Author lizanle
# Description kaminari配置文件
# <%= paginate @users, :window => 2 %>
# 则展示页会像 5 6 7 8 9 , 当7是当前页的时候
# <%= paginate @users, :outer_window => 3 %>
# 分页展示会像 1 2 3 4 ...(snip)... 17 18 19 20 当总共有20个页面的时候
# <%= paginate @users, :left => 1, :right => 3 %>
# 分页展示会像 1 ...(snip)... 18 19 20 当总共有20个页面的时候
# <%= paginate @users, :param_name => :pagina %>
# 这样子会将每个链接传进去一个参数 :pagina
# <%= paginate @users, :params => {:controller => 'foo', :action => 'bar'} %>
# 这样子将会修改每个链接的控制器和动作. :controller and :action
# <%= paginate @users, :remote => true %>
# 这将会使每个链接使用ajax方式, 极其简单, 非常完美的工作。data-remote="true"
#更多知识详见 https://github.com/honwlee/kaminari
Kaminari . configure do | config |
# config.default_per_page = 25
# config.max_per_page = nil
config . window = 1
# config.outer_window = 3
config . left = 2
config . right = 2
# config.page_method_name = :page
# config.param_name = :page
end