title: Ransack custom default sort
body: <p>After spending the second half of my day on this hopefully just in need of some fresh eyes. Getting this error while <a href="https://github.com/ernie/ransack/wiki/Sorting-in-the-Controller" rel="nofollow">trying to set a default</a> sort for my index controller using ransack and I'm not sure why </p>
  
  <pre><code>undefined method `split' for #&lt;Post:0x007fabedac69a8&gt;
  </code></pre>
  
  <p>Here is my controller </p>
  
  <pre><code>class PostsController &lt; ApplicationController
    def index
      @search = Post.search(params[:q])
      @search.sorts = Post.find_with_reputation(:votes,:all, order: "votes desc") if @search.sorts.empty?
      @posts = @search.results
    end
  end
  </code></pre>
  
  <p>Using active record reputation and want the default load to sort by highest votes as you can see. Maybe there is a better way to achieve have the page load with sorted votes and allow ransack searching? Thoroughly confused at the moment.</p>