mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 05:00:58 +08:00
Refactor array concatenation
This commit is contained in:
parent
a43ed88699
commit
f53ba6a3b0
|
@ -21,11 +21,8 @@ class SuggestedTopicsBuilder
|
|||
return if results.blank?
|
||||
|
||||
# Keep track of the ids we've added
|
||||
@excluded_topic_ids << results.map {|r| r.id}
|
||||
@excluded_topic_ids.flatten!
|
||||
|
||||
@results << results
|
||||
@results.flatten!
|
||||
@excluded_topic_ids.concat results.map {|r| r.id}
|
||||
@results.concat results
|
||||
end
|
||||
|
||||
def results_left
|
||||
|
|
Loading…
Reference in New Issue
Block a user