VRFS-3036 refactoring band search
This commit is contained in:
parent
7e2e5241bf
commit
674d1de2d3
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -68,6 +68,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?
|
||||
|
|
|
|||
Loading…
Reference in New Issue