fix postdate
This commit is contained in:
parent
4c07156162
commit
88365ba6c1
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue