1
這裏是我的模型:Rails的ActiveRecord的深層渴望裝載
class User < ActiveRecord::Base
has_many :products
has_many :comments
end
class Product < ActiveRecord::Base
belongs_to :user
has_many :comments
end
class Comment < ActiveRecord::Base
belongs_to :user
belongs_to :product
end
我需要從當前用戶得到評論記錄產品只有
我如何去做?感謝
非常感謝:D –