开发者

Distinguish models

开发者 https://www.devze.com 2023-03-23 09:09 出处:网络
I have three models: Applications, Permission, User And for Application I have has_many :permissions, :through => app_default

I have three models:

Applications, Permission, User

And for Application I have

has_many :permissions, :through => app_default
has_many :permissions, :through => app_perm

Will that work? If I开发者_运维知识库 do Application.permission from which table will take the permissions? What about nested forms as well?


Use polymorhpic associations to get this work.

0

精彩评论

暂无评论...
验证码 换一张
取 消