mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 20:08:26 +00:00
Merge pull request #1187 from stephankaag/refactor_array_concatenation
Refactor array concatenation
This commit is contained in:
commit
8947d1aeac
@ -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