Skip to content

Instantly share code, notes, and snippets.

@jeremytregunna
Created July 30, 2011 18:17
Show Gist options
  • Select an option

  • Save jeremytregunna/1115817 to your computer and use it in GitHub Desktop.

Select an option

Save jeremytregunna/1115817 to your computer and use it in GitHub Desktop.
access_control.roles_for :any do |role|
role.allow "/login"
role.allow "/logout"
role.allow "/register"
role.allow "/"
end
access_control.roles_for :admin do |role|
role.protect "/repositories"
end
access_control.roles_for :users do |role|
role.protect "/repositories"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment