Created
May 26, 2011 23:00
-
-
Save emzeq/994302 to your computer and use it in GitHub Desktop.
User Context in Resource Registration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActiveAdmin.register Product do | |
authorized_actions = [:index, :show, :new, :create] | |
authorized_actions << :destroy if current_admin_user.super_admin? | |
actions authorized_actions | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment