[openstreetmap/openstreetmap-website] count > 0 could be exists? (#1616)
lelelelemon
notifications at github.com
Wed Aug 23 06:49:47 UTC 2017
```
openstreetmap-website/app/controllers/relation_controller.rb:162: relationids = RelationMember.where(:member_type => objtype, :member_id => params[:id]).collect(&:relation_id).uniq
--
openstreetmap-website/app/models/old_way.rb:58: @nds \|\|= old_nodes.order(:sequence_id).collect(&:node_id)
```
We can change collect(:xx) to pluck(:xx) which is more efficient
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/1616#issuecomment-324237818
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20170822/88a3171f/attachment.html>
More information about the rails-dev
mailing list