From 5837e842e166de7d88bec800f9e7c45423515cdb Mon Sep 17 00:00:00 2001 From: JiangRu Date: Wed, 15 Apr 2015 20:30:48 +0800 Subject: [PATCH] add is_hidden didn't show on json --- app/controllers/admin/bulletins_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/admin/bulletins_controller.rb b/app/controllers/admin/bulletins_controller.rb index 464da9c..2dac1a9 100644 --- a/app/controllers/admin/bulletins_controller.rb +++ b/app/controllers/admin/bulletins_controller.rb @@ -19,6 +19,8 @@ class Admin::BulletinsController < ApplicationController end bulletins = bulletins.where(:is_hot => params[:is_hot]) if !params[:is_hot].blank? + bulletins = bulletins.where(:is_hidden => false) + bulletins = bulletins.where(:category_id.in => params[:categories]) if !params[:categories].blank? bulletins = bulletins.where(:tagged_ids.in => params[:tags]) if !params[:tags].blank? bulletins = bulletins.where(:is_preview.in=>[false,nil])