You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Elberet edited this page Apr 7, 2012
·
2 revisions
In order to get CanCan to work with actions that work on the collection of items in a resource (e.g. new, import, export) you need to check for CanCan abilities like so: (from #72)
ActiveAdmin.register Post do
action_item :only => [:edit, :show] do
if controller.current_ability.can?( :change_password, resource )
link_to "Change Password", change_password_app_admin_user_path( resource )
end
end
end