I have @productrecords and @clone_record in controller method. While deploying the following code into staging,
= f.association :product, :collection => Category.products,:include_blank => "Select Product",:label => "* Product", :selected =>@productrecords.product_id ? @productrecords.product_id : @clone_record.product_id
I get an error "Avoid using instance variables in partials views" in houndci bot.
What is the best practice to fix this issue?
<%= render partial: 'products', collection: Category.products, locals: {size: 30} %>