2
votes

I am using this piece of code to filter out the users with either email or alternate email specified in the filter search as supported by Meta search which is used in Active Admin.

ActiveAdmin.register User do
    filter :email_or_alternate_email, :as => :string
end

This seems to work fine with MySql but doesn't return any results with MongoDB.

The following are my Gem versions:

activeadmin-mongoid (0.1.0)
activeadmin (~> 0.5)
meta_search (>= 1.1.0.pre)
mongoid (>= 2.4)

Any other solution for this?

1

1 Answers

0
votes

Anyways, I have figured out that there is no current support for custom filters. The activeadmin-mongoid gem supports only the basic functionality of active admin filters.

https://github.com/elia/activeadmin-mongoid/issues/69