This commit is contained in:
chiu 2021-06-16 18:07:18 +08:00
parent cccf18ba4c
commit 1717bd6d27
1 changed files with 1 additions and 1 deletions

View File

@ -329,7 +329,7 @@ class Admin::EventNewsController < OrbitAdminController
now_event_news_page = EventNews.where(:title.ne => "",:is_preview.in=>[false,nil])
.order_by(sort).map(&:id).map.with_index.select{|v,i| v==event_news.id}[0][1] rescue nil
now_event_news_page = now_event_news_page.nil? ? 0 : ((now_event_news_page+1).to_f/10).ceil
redirect_to admin_event_news_index_path(:page=>now_bulletin_page)
redirect_to admin_event_news_index_path(:page=>now_event_news_page)
end
def destroy