Skip to content

Instantly share code, notes, and snippets.

@aaronjensen
Created July 17, 2012 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronjensen/190e9d78ac6a1d123ee4 to your computer and use it in GitHub Desktop.
Save aaronjensen/190e9d78ac6a1d123ee4 to your computer and use it in GitHub Desktop.
before_filter :profile_if_admin unless Rails.env.test?
def profile_if_admin
return unless user_signed_in?
Rack::MiniProfiler.authorize_request if current_user.admin?
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment