Skip to content

Commit

Permalink
Code climate [4]
Browse files Browse the repository at this point in the history
  • Loading branch information
milaaraujo committed Jul 25, 2018
1 parent ac462fc commit 3970a28
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions app/services/search_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,10 @@ def getRecentProfiles(srchString)
def getRecentProfilesTag(tagName = nil)
nodes = Node.all.order("changed DESC").limit(100).distinct
users = []

nodes.each do |node|
if node.author.status != 0
if tagName.blank?
users << node.author.user
elsif node.author.user.has_tag(tagName)
users << node.author.user
end
end
next unless node.author.status != 0 && ((!tagName.nil? && node.author.user.has_tag(tagName)) || tagName.nil?)
users << node.author.user
end

users = users.uniq
Expand Down

0 comments on commit 3970a28

Please sign in to comment.