Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Ch4s3/bike_stack
Browse files Browse the repository at this point in the history
  • Loading branch information
clickclickonsal committed Nov 16, 2014
2 parents 1ddaacf d77214f commit b109d13
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions app/controllers/api/spots_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 17,13 @@ def index
end

def find
lat = lockup_params[:lat]
lon = lockup_params[:lon]
rad = lockup_params[:rad] || 0.1
lat = params["lock_up"]["lat"].to_f
lon = params["lock_up"]["lon"].to_f
rad = params["lock_up"]["rad"].to_f || 0.1

results = LockUp.near([lat, lon], rad)
@json = results.map{|s| s.to_json_with_photo_url}
respond_to do |format|
format.json { render json: @json }
end
render json: @json
end

def vote
Expand Down

0 comments on commit b109d13

Please sign in to comment.