N+1問題の解決方法がわからず悩んでいます。
bulletを導入し、N+1問題を監視するようにしたのですが、
以下の警告が出て、その警告をどの部分に反映したらいいのかがわかりません。
ruby
1USE eager loading detected 2Spree::Product => [:master] 3Add to your finder: :includes => [:master]
コントローラーのコード def show @taxon = Spree::Taxon.find(params[:taxon_id]) @taxonomies = Spree::Taxonomy.includes(:root) @products = Spree::Product.includes(:taxons).where(spree_taxons: {id: @taxon}) end
どの部分にincludes(:master)を反映させればいいのでしょうか。。
どなたかご教示願います。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。