-
-
Save aaronjensen/190e9d78ac6a1d123ee4 to your computer and use it in GitHub Desktop.
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
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