Fix scope error

This commit is contained in:
chris 2013-09-16 03:16:23 +08:00 committed by saurabhbhatia
parent 0f2c13e7ac
commit 9fbf9e940e
1 changed files with 1 additions and 1 deletions

View File

@ -327,7 +327,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
# ================================================================
def get_bulletins_as_json
I18n.locale = params[:locale] || :zh_tw
bulletins = params[:category_id] ? Bulletin.where(bulletin_category_id: params[:category_id]).order_by(:created_at, :desc) : Bulletin.admin_manager_all.order_by(:created_at, :desc)
bulletins = params[:category_id] ? Bulletin.where(bulletin_category_id: params[:category_id]).order_by(:created_at, :desc) : Bulletin.all.order_by(:created_at, :desc)
bulletins = Kaminari.paginate_array(bulletins).page(params[:page]).per(params[:per] || 10) if params[:paginate]
custom_bulletins = bulletins.inject([]) do |data, bulletin|