Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

API is DONE!!!!

  • Loading branch information...
commit f8b2c9e7477f0dacdfe620982f802249d1a47b89 1 parent aa45ad4
Adam Becker authored

Showing 1 changed file with 6 additions and 2 deletions. Show diff stats Hide diff stats

  1. +6 2 app/controllers/stations_controller.rb
8 app/controllers/stations_controller.rb
... ... @@ -1,8 +1,12 @@
1   -class StationsController < ApplicationController
  1 + class StationsController < ApplicationController
2 2 # GET /stations
3 3 # GET /stations.json
4 4 def index
5   - @stations = Station.all
  5 + if params[:lat] && params[:lng]
  6 + @stations = Station.near([params[:lat], params[:lng]], 200)
  7 + else
  8 + @stations = Station.all
  9 + end
6 10
7 11 respond_to do |format|
8 12 format.html # index.html.erb

0 comments on commit f8b2c9e

Please sign in to comment.
Something went wrong with that request. Please try again.