title: Ransack gem - Case insensitive sort (Rails 4)
body: <p>Using the Ransack gem, I'm trying to sort a simple list on an index page. However, there are both uppercase and lowercase values in the sort field <code>name</code>. To make them sorted useful, the sort should be case insensitive.</p>
  
  <p>This is the model <code>Vendor</code>:</p>
  
  <pre><code>name:string, email:string, address:string, phone:string, fax:string
  </code></pre>
  
  <p>This is the controller:</p>
  
  <pre><code>class VendorsController &lt; ApplicationController
  
  def index
    @search = Vendor.search(params[:q])
    @vendors = @search.result
  end
  </code></pre>
  
  <p>And the view:</p>
  
  <pre><code>/index.html.slim
  tr
    th = sort_link @search, :name, "Name"
    th = sort_link @search, :email, "Company Email"
    th = sort_link @search, :address, "Address"
  </code></pre>
  
  <p>Any advice would be greatly appreciated.</p>