Advertisement
twinfacer

over 9000 requests

Oct 26th, 2015
468
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rails 0.15 KB | None | 0 0
  1. all.joins(:remote_cities).map do |city|
  2.   name = [city.ru_name, city.remote_cities.map(&:provided_name)].flatten.uniq.compact
  3.   [name, city.id]
  4. end.sort
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement