You will have to roll out your own scopes. ActiveAdmin uses meta_search for its filters (https://github.com/ernie/meta_search).
In your admin file:
filter :child_id_all,
:as => :check_boxes,
:collection => proc { Child.all }
filter :child_id_all_not,
:as => :check_boxes,
:collection => proc { Child.all }
In your parent model:
scope :child_id_all_in, -> ids {
ids.reduce(scoped) do |scope, id|
subquery = Parent.select('`parents`.`id`').
joins(:childs).
where('`childs`.`id` = ?', id)
scope.where("`parents`.`id` IN (#{subquery.to_sql})")
end
}
scope :child_id_all_not_in, -> ids {
ids.reduce(scoped) do |scope, id|
subquery = Parent.select('`parents`.`id`').
joins(:childs).
where('`childs`.`id` = ?', id)
scope.where("`parents`.`id` NOT IN (#{subquery.to_sql})")
end
}
search_methods :child_id_all_in
search_methods :child_id_all_not_in