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