Active Admin allows me to define filters that are displayed on the index page like so:
ActiveAdmin.register Promo do
  filter :name
  filter :address
  filter :city
  filter :state
  filter :zip
end
I would like to combine all the fields above into one, so that I can search for Promos that contain the search string in name or full address. My model already has a named scope that I can use:
class Promo < ActiveRecord::Base
  scope :by_name_or_full_address, lambda { |q| where('name LIKE :q OR address LIKE :q OR city LIKE :q OR state LIKE :q OR zip LIKE :q', :q => "%#{q}%") }
end
 
     
     
     
     
     
     
    