Instance variable not set with redirect
<p>What would cause my instance variable @product to not be set/passed for the redirect.  Product is an ActiveModel object, not ActiveRecord. to be more specific, the @product variable is not appearing in the redirect_to(new_services_path) or redirect_to(home_path) pages.  As the @product variable need to populate a form in my footer that is on every page.</p>

<p>Application_controller:</p>

<pre><code>class ApplicationController &lt; ActionController::Base 
  before_filter :set_product

  private

  def set_product
    @product ||= Product.new
  end
end
</code></pre>

<p>Product_controller:</p>

<pre><code>  def new
  end


 def create
    @product = Product.new(params[:product])

    if  @product.category == "wheels"
      redirect_to(new_services_path) 
    else
      redirect_to(home_path) 
    end
  end
</code></pre>

<p>Issue related to this original post..
<a href="https://stackoverflow.com/questions/35104715/passing-variables-through-multiple-partials-rails-4">Passing variables through multiple partials (rails 4)</a></p>