diff --git a/app/controllers/admin/newsbulletins_controller.rb b/app/controllers/admin/newsbulletins_controller.rb index 628ad58..0a80e5a 100644 --- a/app/controllers/admin/newsbulletins_controller.rb +++ b/app/controllers/admin/newsbulletins_controller.rb @@ -23,6 +23,7 @@ class Admin::NewsbulletinsController < ApplicationController bulletins = bulletins.where(:tagged_ids.in => params[:tags]) if !params[:tags].blank? bulletins = bulletins.where(:is_preview.in=>[false,nil]) bulletins = bulletins.where(:approved.ne => false , :rejected.ne => true) + bulletins = bulletins.where(:postdate.lt=>Time.now) bulletins = bulletins.desc( :is_top, :postdate).page(page_num).per(per_page) @@ -84,6 +85,7 @@ class Admin::NewsbulletinsController < ApplicationController end bulletin_count = bulletin_count.where(:is_preview.in=>[false,nil]) bulletin_count = bulletin_count.where(:approved.ne => false , :rejected.ne => true) + bulletin_count = bulletin_count.where(:postdate.lt=>Time.now) total_pages = bulletin_count.count # End