Fix pagination bug in bulletins
This commit is contained in:
parent
5f5871d1c2
commit
4da03026a4
|
@ -13,7 +13,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||||
|
|
||||||
# @bulletins = Bulletin.search(params[:search], params[:category_id])
|
# @bulletins = Bulletin.search(params[:search], params[:category_id])
|
||||||
# @bulletins = Bulletin.all.order_by([params[:sort], params[:direction]])
|
# @bulletins = Bulletin.all.order_by([params[:sort], params[:direction]])
|
||||||
@bulletins = params[:sort] ? get_sorted_bulletins : Bulletin.all
|
@bulletins = params[:sort] ? get_sorted_bulletins : Bulletin.all.page(params[:page]).per(10)
|
||||||
@bulletin_categories = BulletinCategory.all
|
@bulletin_categories = BulletinCategory.all
|
||||||
|
|
||||||
@bulletin_link = BulletinLink.new
|
@bulletin_link = BulletinLink.new
|
||||||
|
|
Reference in New Issue