Skip to content

Instantly share code, notes, and snippets.

@drale2k
Created February 12, 2012 18:56
Show Gist options
  • Select an option

  • Save drale2k/1810253 to your computer and use it in GitHub Desktop.

Select an option

Save drale2k/1810253 to your computer and use it in GitHub Desktop.

Revisions

  1. drale2k revised this gist Feb 12, 2012. 1 changed file with 11 additions and 11 deletions.
    22 changes: 11 additions & 11 deletions gistfile1.rb
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,11 @@
    def index
    if params[:near]
    @locations = Location.near(
    params[:near], # Latitude, Longitude
    params[:radius] ? params[:radius].to_i : 10,
    :units => :km
    )
    else
    @locations = Location.all
    end
    end
    def index
    if params[:near]
    @locations = Location.near(
    params[:near], # Latitude, Longitude
    params[:radius] ? params[:radius].to_i : 10,
    :units => :km
    )
    else
    @locations = Location.all
    end
    end
  2. drale2k created this gist Feb 12, 2012.
    11 changes: 11 additions & 0 deletions gistfile1.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    def index
    if params[:near]
    @locations = Location.near(
    params[:near], # Latitude, Longitude
    params[:radius] ? params[:radius].to_i : 10,
    :units => :km
    )
    else
    @locations = Location.all
    end
    end