about summary refs log tree commit diff
path: root/app/services/search_service.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-15 16:56:29 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-15 16:56:29 +0100
commitfdc17bea58f210f62ac0d9e836b68e84c6dbd15c (patch)
tree491613c94695ba867e81d50124e7e3eb73a0eff5 /app/services/search_service.rb
parenta91c3ef6cef0fe5a1645c043e7d4a5ef96e82c4f (diff)
Fix rubocop issues, introduce usage of frozen literal to improve performance
Diffstat (limited to 'app/services/search_service.rb')
-rw-r--r--app/services/search_service.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/app/services/search_service.rb b/app/services/search_service.rb
index 9e8ee6220..c4cffda13 100644
--- a/app/services/search_service.rb
+++ b/app/services/search_service.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 class SearchService < BaseService
   def call(query, limit, resolve = false)
     return if query.blank?
@@ -5,10 +7,10 @@ class SearchService < BaseService
     username, domain = query.split('@')
 
     results = if domain.nil?
-      Account.search_for(username)
-    else
-      Account.search_for("#{username} #{domain}")
-    end
+                Account.search_for(username)
+              else
+                Account.search_for("#{username} #{domain}")
+              end
 
     results = results.limit(limit).with_counters