Skip to content
This repository has been archived by the owner on Nov 19, 2019. It is now read-only.

Commit

Permalink
Some TODO notes [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Long committed Jul 10, 2012
1 parent 5bd179a commit 8098049
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion TODO.markdown
Expand Up @@ -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.

0 comments on commit 8098049

Please sign in to comment.