gregbell/active_admin — Issue #938: Show a filter to only some users
Author: houen
Created: 2012-01-24 12:08:49+00:00
State: open

I am trying to build an admin section, where some sidebar filters should only be available to some users. I am trying something like this:

ActiveAdmin.register User do
filter :first_name, :as => :string, :if => proc { can? :view_personal_information, User }

But it looks like filters do not evalutate proc's the same way e.g. menu calls does :-(

Does anyone know how to do this?

-Søren