fix of announcement dissapearing when going to next page.

This commit is contained in:
Harry Bomrah 2016-10-14 12:45:23 +05:30
parent cf61891dd5
commit 6936f49825
1 changed files with 2 additions and 2 deletions

View File

@ -18,8 +18,8 @@ class AnnouncementsController < ApplicationController
feeds_anns = get_feed_announcements("index",params["source"]) feeds_anns = get_feed_announcements("index",params["source"])
end end
end end
# (OrbitHelper.page_number == 1 or OrbitHelper.page_number.nil?) &&
if (OrbitHelper.page_number == 1 or OrbitHelper.page_number.nil?) && !params["source"].present? if !params["source"].present?
if !params['tags'].blank? if !params['tags'].blank?
top_anns = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil], :is_top => true).and(:title.ne => nil).can_display.filter_by_categories([],false).filter_by_tags(params['tags']).to_a top_anns = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil], :is_top => true).and(:title.ne => nil).can_display.filter_by_categories([],false).filter_by_tags(params['tags']).to_a
else else