📜  如何在 Rails 中处理权限 - Ruby 代码示例

📅  最后修改于: 2022-03-11 15:04:50.246000             🧑  作者: Mango

代码示例2
class Post
  has_many :post_users
  has_many :users, through: :post_users
end

class PostUser
  belongs_to :post
  belongs_to :user
end

class User
  has_many :post_users
  has_many :posts, through: :post_users
end