X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/aee222551ad5f23ba6d2f88e780a347d725f9a05..98de681e4711ad3bf5526e511002c8f0e91860a8:/app/models/user.rb diff --git a/app/models/user.rb b/app/models/user.rb index aaa00169f..de5529e02 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -211,7 +211,7 @@ class User < ActiveRecord::Base .where("id != ?", id) .where(sql_for_area) .where("#{sql_for_distance} <= ?", radius) - .order(sql_for_distance) + .order(Arel.sql(sql_for_distance)) .limit(num) else nearby = []