small fix for tag filter
This commit is contained in:
parent
fc325dce2d
commit
1d4ddef575
|
@ -19,7 +19,11 @@ class AnnouncementsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
if (OrbitHelper.page_number == 1 or OrbitHelper.page_number.nil?) && !params["source"].present?
|
if (OrbitHelper.page_number == 1 or OrbitHelper.page_number.nil?) && !params["source"].present?
|
||||||
top_anns = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil], :is_top => true).and(:title.ne => nil).can_display.filter_by_categories([],false).to_a
|
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
|
||||||
|
else
|
||||||
|
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.to_a
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if !feeds_anns.blank?
|
if !feeds_anns.blank?
|
||||||
|
|
Loading…
Reference in New Issue