title: distinct for sorting with ransack
body: <p>i was trying to sort values of a table with sort_link from Ransack. i found <a href="http://youcanlookitup.wordpress.com/2012/11/20/filter-search-pages-with-rails-sql-views-rans/" rel="noreferrer">an example</a> which is really helpful. but, i think i'm having problem with 'distinct'. i got this error 'ORDER-BY expressions must appear in SELECT list; DISTINCT'. 
  my code looks like this :</p>
  
  <pre><code>q =user.joins(:buyer).order('users.name')
  ransack = params["filter"]
  @search = q.search(ransack)
  @users = @search.result(:distinct=&gt;true)
  </code></pre>
  
  <p>do i forget something? thanks in advance!</p>