Skip to content

Instantly share code, notes, and snippets.

@fffx
Last active April 5, 2017 00:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fffx/188101ac16f853d4ac7c6b6d3f940687 to your computer and use it in GitHub Desktop.
Save fffx/188101ac16f853d4ac7c6b6d3f940687 to your computer and use it in GitHub Desktop.
cancan permissions
+------------+
|permissions |
+-----+------+
|
has_many through +----+ permission_id
| +--------------------+
+-----^+-> | role_permissions |
| +--------------------+
has_many through +----+ role_id
+
+-----------+
| roles |
+----+------+
^
|
|
|
has_many
|
|
+----+---+
| users |
+--------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment