diff --git a/lib/tasks/announcement_link_widget.rake b/lib/tasks/announcement_link_widget.rake index 727802e..93a7861 100644 --- a/lib/tasks/announcement_link_widget.rake +++ b/lib/tasks/announcement_link_widget.rake @@ -30,7 +30,7 @@ namespace :announcement_link_widget do end if common_tags_frontend.size > 0 - Bulletin.all.each do |ann| + Bulletin.all.can_display.is_approved.order_by(:created_at=>'desc').each do |ann| intersection = ann.tags & an_tags if intersection.size > 0 intersection.each do |t| @@ -42,7 +42,7 @@ namespace :announcement_link_widget do end end - WebLink.all.each do |wl| + WebLink.all.can_display.order_by(:created_at=>'desc').each do |wl| intersection = wl.tags & l_tags # debugger if intersection.size > 0