Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Commit

Permalink
cope with nil strretview url param
Browse files Browse the repository at this point in the history
  • Loading branch information
jnicho02 committed Aug 25, 2014
1 parent 345afcb commit adb67c0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/controllers/plaques_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,12 @@ def create
# PUT /plaques/1
# PUT /plaques/1.xml
def update
point = help.geolocation_from params[:streetview_url]
if !point.latitude.blank? && !point.longitude.blank?
params[:plaque][:latitude] = point.latitude
params[:plaque][:longitude] = point.longitude
if (params[:streetview_url])
point = help.geolocation_from params[:streetview_url]
if !point.latitude.blank? && !point.longitude.blank?
params[:plaque][:latitude] = point.latitude
params[:plaque][:longitude] = point.longitude
end
end

if params[:location]
Expand Down

0 comments on commit adb67c0

Please sign in to comment.