diff --git a/ruby/lib/jam_ruby/models/base_search.rb b/ruby/lib/jam_ruby/models/base_search.rb index 84b5c9833..d6244b355 100644 --- a/ruby/lib/jam_ruby/models/base_search.rb +++ b/ruby/lib/jam_ruby/models/base_search.rb @@ -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) diff --git a/ruby/lib/jam_ruby/models/musician_search.rb b/ruby/lib/jam_ruby/models/musician_search.rb index e8284ebfc..cb6f789a9 100644 --- a/ruby/lib/jam_ruby/models/musician_search.rb +++ b/ruby/lib/jam_ruby/models/musician_search.rb @@ -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 diff --git a/web/app/helpers/client_helper.rb b/web/app/helpers/client_helper.rb index c4977e130..c3942e798 100644 --- a/web/app/helpers/client_helper.rb +++ b/web/app/helpers/client_helper.rb @@ -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?