So I have the following in projects#show:
<h1>Discussion</h1>
<%= render 'discussions/creatediscussion', :project => @project %>
<ul>
<%= render :partial => 'discussions/discussion', :collection => @discussions %>
</ul>
<h1>Category</h1>
<ul id="categories" data-update-url="<%= sort_categories_url %>">
<%= render :partial => 'categories/category', :collection => @categories %>
</ul>
<%= render 'categories/createcategory', :project => @project %>
This essentially renders forms, views and so on and so forth. The issue is that while NONE of these throw errors in any way, and while creating things like discussions and categories work – any of the :partial => ” do not render. while the rest of the renders do…..
any thoughts as to why?
Have you tried:
<%= render :partial => 'discussions/creatediscussion', :locals => {:project => @project} %>or
<%= render :partial => 'discussions/discusion', :locals => {:discussions => @discussions} %>or
<%= render :partial => 'categories/category', :locals => {:categories => @categories} %>You might need to rework your partial code a bit, but declaring locals always works for me.