title: rails controller descending order get the first element
body: <p>What is wrong with this statement</p>
  
  <pre><code>@lastloc = Location.all(:customer_id == resource.id , :order =&gt; 'created_at DESC').first
  if (@lastloc.longitude != params[:customer][:longitude] &amp;&amp; @lastloc.latitude != params[:customer][:latitude])
    ...
  end
  </code></pre>
  
  <p>What i am trying to do is to grab all Location with a certain id, then order then with the latest one then verify if different value then i proceed else do nothing</p>