Pagination improvements (#1445)
* Replace will_paginate with kaminari * Use #page instead of #paginate in controllers * Replace will_paginate.page_gap with pagination.truncate in i18n * Customize kaminari views to match prior styles * Set kaminari options to match prior behavior * Replace will_paginate with paginate in views
This commit is contained in:
parent
a283786463
commit
4ada50985a
36 changed files with 77 additions and 65 deletions
|
@ -35,11 +35,11 @@ class AccountsController < ApplicationController
|
|||
end
|
||||
|
||||
def followers
|
||||
@followers = @account.followers.order('follows.created_at desc').paginate(page: params[:page], per_page: 12)
|
||||
@followers = @account.followers.order('follows.created_at desc').page(params[:page]).per(12)
|
||||
end
|
||||
|
||||
def following
|
||||
@following = @account.following.order('follows.created_at desc').paginate(page: params[:page], per_page: 12)
|
||||
@following = @account.following.order('follows.created_at desc').page(params[:page]).per(12)
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue