我试过了:
filter :something, :label => lambda{ condition?(current_active_admin_user) ? "option1" : "option2" }
但它不起作用。但是相同的lambda代码适用于菜单。
答案 0 :(得分:0)
尝试
if current_active_admin_user
filter :something, :label => "option1"
else
filter :something, :label => "option2"
end
祝你好运。