Skip to content

Instantly share code, notes, and snippets.

@emzeq
Created May 26, 2011 23:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save emzeq/994302 to your computer and use it in GitHub Desktop.
Save emzeq/994302 to your computer and use it in GitHub Desktop.
User Context in Resource Registration
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