mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-11 17:24:50 -04:00
Improve readability of controllers/places slightly.
This commit is contained in:
@@ -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