title: Rails, Geocoder, and near
body: <p>I'm having a slight issue trying to display certain locations based on proximity to a user. In my controller I have this:</p>
  
  <pre><code>  if User.find(current_user)
      @user = User.find(current_user)
      @locations = Location.near(params[:latitude =&gt; @user.latitude, :longitude =&gt; @user.longitude], 50, :order =&gt; :distance)
    end
  </code></pre>
  
  <p>Users have a latitude and longitude stored. I'm thinking I've not got the right parameters in the Location.near line, but I can't figure out what they should be.</p>
  
  <p>Any help would be appreciated.</p>
  
  <p>Cheers!</p>