ruby on rails - n+1 issue in ActiveAdmin model -


i have model has_many association causing index page of of parent model hang. associated table has 517k records. have attempted eager loading in model , activeadmin model. bullet gem keeps telling have unused eager loading when attempt below. confused now.

design.rb

has_many :users_designs 

designs_controller

@designs = design.where("item_id = ?", @item.id).order(:item_id, :id).paginate(page: params[:page], :per_page => 200).includes(:users_designs, :company) 

activeadmin model

controller   def scoped_collection     itemsdesign.includes(:users_designs)   end end 


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -