VRFS-3036 refactoring band search

This commit is contained in:
Jonathan Kolyer 2015-05-07 13:21:53 +00:00
parent ce3bf635f0
commit 749c58f377
3 changed files with 10 additions and 9 deletions

View File

@ -64,6 +64,15 @@ module JamRuby
sort_order: { keys: SORT_VALS, map: SORT_ORDERS },
}
RESULT_FOLLOW = :follows
RESULT_FRIEND = :friends
COUNT_FRIEND = :count_friend
COUNT_FOLLOW = :count_follow
COUNT_RECORD = :count_record
COUNT_SESSION = :count_session
COUNTERS = [COUNT_FRIEND, COUNT_FOLLOW, COUNT_RECORD, COUNT_SESSION]
def self.user_search_filter(user)
unless ss = user.send(self.name.demodulize.tableize.singularize)
ss = self.create_search(user)

View File

@ -148,15 +148,6 @@ module JamRuby
rel.includes([:instruments, :followings, :friends])
end
RESULT_FOLLOW = :follows
RESULT_FRIEND = :friends
COUNT_FRIEND = :count_friend
COUNT_FOLLOW = :count_follow
COUNT_RECORD = :count_record
COUNT_SESSION = :count_session
COUNTERS = [COUNT_FRIEND, COUNT_FOLLOW, COUNT_RECORD, COUNT_SESSION]
def process_results_page(_results)
@results = _results
@user_counters = {} and return self unless user

View File

@ -49,6 +49,7 @@ module ClientHelper
gon.ftue_network_test_max_clients = Rails.application.config.ftue_network_test_max_clients
gon.ftue_maximum_gear_latency = Rails.application.config.ftue_maximum_gear_latency
gon.musician_search_meta = MusicianSearch::SEARCH_FILTER_META
gon.band_search_meta = BandSearch::SEARCH_FILTER_META
# is this the native client or browser?
@nativeClient = is_native_client?