I am trying to pass instance variables through multiple partials and having trouble. undefined local variable or method "product"
Application.html.erb"
<%= render 'shared/footer', :product => @product %>
_footer.html.erb
<%= render 'shared/my_form', :product => product %>
_my_form.html.erb
<%= form_for( product ) %>
UPDATE:
I'm starting to think it might be that the instance variable @product is just not being set/passed for the redirect. Could the following be causing the issue? Opened different issue here:
If you want to pass local variables, you should use this syntax:
For reference: http://guides.rubyonrails.org/layouts_and_rendering.html (3.4.4)
You have to use this syntax:
Application.html.erb"
_footer.html.erb
_my_form.html.erb
Notice the use of
partial:
andlocals: