title: ActiveAdmin how to sort column with associations
body: <p>I'm developing an ActiveAdmin app, and I want to sort a column of businesses by their "type". Unfortunately my code is not working. What code should I use to accomplish this? Here is my code...</p>
  
  <p><code>app/models/business.rb</code></p>
  
  <hr>
  
  <pre><code>class Business &lt; ActiveRecord::Base   
       belongs_to :type
  
       attr_accessible :description, :email, :facebook, :foursquare, :google, :manager,
      :mobile, :name, :phone, :type_id, :url, :yelp 
  end
  </code></pre>
  
  <p><code>app/models/type.rb</code></p>
  
  <hr>
  
  <pre><code>class Type &lt; ActiveRecord::Base
    attr_accessible  :category
    has_many :businesses
  
    def to_s
      category
    end
  end
  </code></pre>
  
  <p><code>app/admin/businesses.rb</code></p>
  
  <hr>
  
  <pre><code>ActiveAdmin.register Business, { :sort_order =&gt; :name_asc } do
    scope :joined, :default =&gt; true do |businesses|
      businesses.includes [:type]
    end
    index do
      column :name
      column :type, :sortable =&gt; 'businesses.type'
      column :manager
      column :email
      default_actions
    end
  end
  </code></pre>
  
  <p>Thanks!</p>