title: Active Admin Search/Filter widget on Custom Page
body: <p>I want to have a search widget/filter feature on a custom page using active admin to provide a look-up feature. Using the action_items I have my own action and form that renders the search page. On the search page the 'filters' that I need to show include text fields of the 'Parent' resource and a drop down list of the Parent's Parent. The association is as follows</p>
  
  <pre><code>Class MyChildResource
    belongs_to :myParentResource
  
  Class MyParentResource
    attr_accessible :name, :close_to_place, :date
    has_many :myChildResources
    belongs_to :myGrandParentResource
  
  class MyGrandParentResource
    has_many :myParentResources
  </code></pre>
  
  <p>In the active admin Resource</p>
  
  <pre><code>ActiveAdmin.register MyChildResource do
    action_item :only=&gt;:index do
      link_to("Look Up Availability", search_admin_myChildResources_path)
    end
  
    collection_action :search do
      # do something here similar to the 'filter' feature like filter on myparentresource.date as date
      filter on myGrandParentResource as drop down 
      filter on myParentResource.close_to_place as string 
    end
  end
  </code></pre>
  
  <p>Do I have to write my own custom meta_search features? I would be fine even if I have to write own search queries, based on the input that the user gives, but my problem is that how do I display the drop down values from the parent's parent model and/or leverage the power of active admin filters.</p>
  
  <p>I read something similar in this question,<a href="https://stackoverflow.com/questions/10178000/how-to-add-a-filter-to-active-admin-dashboard">How to add a filter to Active Admin dashboard?</a> , but it's a hack and it definitely does not answer the question of displaying a list</p>