Fix is_preview
This commit is contained in:
parent
cb7769ea4f
commit
ae93ba9309
|
@ -15,7 +15,7 @@ class Admin::AnnouncementsController < OrbitAdminController
|
|||
@filter_fields = filter_fields(@categories, @tags)
|
||||
@table_fields = [:status, :category, :title, :start_date, :end_date, :last_modified]
|
||||
|
||||
@bulletins = Bulletin.where(:is_preview=>false).order_by(sort).with_categories(filters("category")).with_tags(filters("tag")).with_status(filters("status")).page(params[:page]).per(10)
|
||||
@bulletins = Bulletin.where(:is_preview.in=>[false,nil]).order_by(sort).with_categories(filters("category")).with_tags(filters("tag")).with_status(filters("status")).page(params[:page]).per(10)
|
||||
|
||||
if request.xhr?
|
||||
render :partial => "index"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
class AnnouncementsController < ApplicationController
|
||||
|
||||
def index
|
||||
announcements = Bulletin.where(:is_preview=>false).can_display.order_by(:created_at=>'desc').filter_by_categories
|
||||
announcements = Bulletin.where(:is_preview.in=>[false,nil]).can_display.order_by(:created_at=>'desc').filter_by_categories
|
||||
anns = announcements.collect do |a|
|
||||
statuses = a.statuses.collect do |status|
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ class AnnouncementsController < ApplicationController
|
|||
end
|
||||
|
||||
def widget
|
||||
announcements = Bulletin.where(:is_preview=>false).can_display.order_by(:created_at=>'desc').filter_by_widget_categories
|
||||
announcements = Bulletin.where(:is_preview.in=>[false,nil]).can_display.order_by(:created_at=>'desc').filter_by_widget_categories
|
||||
anns = announcements.collect do |a|
|
||||
statuses = a.statuses.collect do |status|
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue