Skip to content

Instantly share code, notes, and snippets.

@mcansky
Created May 28, 2010 06:57
Show Gist options
  • Save mcansky/416855 to your computer and use it in GitHub Desktop.
Save mcansky/416855 to your computer and use it in GitHub Desktop.
repo = AqRepository.find(params[:id])
if repo.as_right?(current_user)
@repo = repo
else
flash[:warning] = "You don't have sufficient rights"
redirect_to current_user
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment