title: Setting up a has_many through filter with Active Admin
body: <p>I'm trying to simply allow filtering of categories on the Locations page for ActiveAdmin.</p>
  
  <p>I have three models:</p>
  
  <pre><code>class Location &lt; ActiveRecord::Base
    has_many :categories_locations
    has_many :categories, :through =&gt; :categories_locations
  
  class CategoriesLocation &lt; ActiveRecord::Base
      belongs_to :category
      belongs_to :location
  end
  
  class Category &lt; ActiveRecord::Base
      has_many :categories_locations
      has_many :locations, :through =&gt; :categories_locations
  end
  </code></pre>
  
  <p>On my locations page, I'm using this filter:</p>
  
  <pre><code>ActiveAdmin.register Location do
    filter :name
    filter :category, :collection =&gt; proc { Category.all }, :as =&gt; :select
  </code></pre>
  
  <p>However, it keeps throwing an error.</p>
  
  <pre><code>undefined method `category_eq' for #&lt;MetaSearch::Searches::Location:0x007fd4f9b965d8&gt;
  </code></pre>
  
  <p>I've tried filter :categories, filter :categories_locations, but nothing will work. </p>
  
  <p>Has anyone experienced this –– anyone have a solution?</p>