From 842f072e1a3d7e89aed6c4fa591caa3da65f8f67 Mon Sep 17 00:00:00 2001 From: chris Date: Mon, 16 Sep 2013 03:16:23 +0800 Subject: [PATCH] Fix scope error --- .../panel/announcement/back_end/bulletins_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb index 3339f46de..b60461e1e 100644 --- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb +++ b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb @@ -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|