VRFS-1442 prepend users bands to band search results

This commit is contained in:
Jonathan Kolyer 2014-11-21 07:45:02 +00:00
parent 069fc6a664
commit 465fd6fa94
1 changed files with 3 additions and 0 deletions

View File

@ -465,6 +465,9 @@ module JamRuby
srch = Search.new
srch.search_type = :band_filter
srch.page_num, srch.page_count = page, objs.total_pages
if 1 == page && current_user.bands.present?
current_user.bands.order('created_at DESC').each { |bb| objs.unshift(bb) }
end if current_user && current_user.is_a?(User)
srch.band_results_for_user(objs, current_user)
end