mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-21 14:34:22 -04:00
Improve readability of controllers/places slightly.
This commit is contained in:
1 parent
24f306e8ef
commit
ca236ce7fd
1 file changed
+3
-2
@@ -24,9 +24,10 @@ class PlacesController < ApplicationController
|
||||
@units = :km
|
||||
end
|
||||
|
||||
location = Geocoder.search(Geocoder::Query.new(
|
||||
query = Geocoder::Query.new(
|
||||
@place, :distance => @distance, :units => @units
|
||||
))
|
||||
)
|
||||
location = Geocoder.search(query)
|
||||
if location && location[0] && location[0].coordinates
|
||||
@latitude, @longitude = location[0].coordinates
|
||||
if @distance
|
||||
|
||||
Reference in new issue
Block a user