-
-
Save cpjk/98f88ad068123f480037 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require Abilities | |
defmodule User do | |
defstruct id: 1, dude_id: 1 | |
end | |
defmodule M do | |
use Abilities | |
Abilities.can(%User{id: id}, :post, %User{}, when: id in [1,2]) | |
Abilities.can(%User{id: id}, :post, %User{}, when: id in [1,2]) | |
Abilities.can(%User{id: id}, :post, %User{}, when: id in [1,2]) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment