activeadmin - Active Admin: how to set filter label dynamically -


i tried this:

filter :something, :label => lambda{ condition?(current_active_admin_user) ? "option1" : "option2" } 

but not work. same lambda code works menu.

try

if current_active_admin_user    filter :something, :label => "option1"  else    filter :something, :label => "option2" end 

good luck.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -