fix postdate
This commit is contained in:
parent
d8a49dfdfa
commit
48487b80ac
|
@ -23,6 +23,7 @@ class Admin::BulletinsController < 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::BulletinsController < 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
|
||||
|
||||
|
|
Reference in New Issue