0
我正在使用Rails 3.2。如何獲得博客的評論者
我有以下型號:
Blog
Comment
User
class Blog < ActiveRecord::Base
has_many :comments
end
我要評論者對給定的博客列表。
我想是這樣
class Blog < ActiveRecord::Base
has_many :comments
has_many :commenters, ...fill in the blank...
end
@blog.commenters
應該返回用戶實例的數組。
我應該如何填寫上面的空白。