Refactor array concatenation

This commit is contained in:
Stephan Kaag 2013-07-12 21:49:11 +02:00
parent a43ed88699
commit f53ba6a3b0

View File

@ -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