fixed json for nccu

This commit is contained in:
Harry Bomrah 2015-09-21 15:56:15 +08:00
parent eacafbcc86
commit fc35327d11
1 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ class Admin::NewsbulletinsController < ApplicationController
keyword = Regexp.new(".*"+params[:keyword]+".*") keyword = Regexp.new(".*"+params[:keyword]+".*")
bulletins = NewsBulletin.any_of({:title=>keyword},{:subtitle=>keyword},{:text=>keyword}) bulletins = NewsBulletin.any_of({:title=>keyword},{:subtitle=>keyword},{:text=>keyword})
else else
bulletins = NewsBulletin.all bulletins = NewsBulletin.all.can_display
end end
bulletins = bulletins.where(:is_hot => params[:is_hot]) if !params[:is_hot].blank? bulletins = bulletins.where(:is_hot => params[:is_hot]) if !params[:is_hot].blank?