Is there a way to have three way habtm associations in rails / activerecord?
Posted
by txwikinger
on Stack Overflow
See other posts from Stack Overflow
or by txwikinger
Published on 2010-05-10T18:29:23Z
Indexed on
2010/05/10
18:34 UTC
Read the original article
Hit count: 153
Often three (or more) way associations are needed for habtm associations. For instance a permission model with roles.
A particular area of functionality has many users which can access many areas.
The permissions on the area are setup via roles (habtm)
The user/roles association is also habtm
The permissions (read, write, delete, etc) are habtm towards roles.
How would that be best done with rails/activerecord?
© Stack Overflow or respective owner