Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Some TODO notes [ci skip]

  • Loading branch information...
commit 809804981310b4e6be4dc169597bb34abdb96f15 1 parent 5bd179a
@nathanl authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 TODO.markdown
View
6 TODO.markdown
@@ -7,12 +7,16 @@
## Documentation
+Document best suggestions from https://github.com/nathanl/authority/issues/9
+
## Features
-Consider allowing an options hash for class-level checks. For example:
+Allow an options hash for class-level checks. For example:
```ruby
link_to "Add Comment", new_comment_path if current_user.can_create?(Comment, :for => @post)
```
If we need to ask "can the user create a comment on this post?", this syntax would avoid having to instantiate a comment in order to check its associated post.
+
+This should be super-simple: just take the hash and pass it along. Users can specify `:for => @post` or `regarding: @bob` or whatever they want; it's up to them to use that in their authorizer method.
Please sign in to comment.
Something went wrong with that request. Please try again.