Skip to content

Instantly share code, notes, and snippets.

@acorcutt
Created June 1, 2011 22:40
Show Gist options
  • Save acorcutt/1003533 to your computer and use it in GitHub Desktop.
Save acorcutt/1003533 to your computer and use it in GitHub Desktop.
Try
#instead of
current_user && current_user.admin?
#do
current_user.try(:admin?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment