Partial not rendering in section
rkamun1 opened this issue · 8 comments
Hi,
I have a section and trying to render a partial in it like this:
section "Subscribers", :priority => 1 do
render "user_dash"
end
my _user_dash.html.erb file has a table and some independent text. But for some reason it renders a blank section. Is this a bug that you know of?
Thanks!
sorry...figured it out.
Thanks!
Can you write how you did that ? Cause I have the same problem
Any partials must go in a sub-folder named after the "model" for example dashboard partials go in the dashboard folder.
I had trouble rendering a partial in my dashboard. In case anyone else encounters a similar issue, here's what I did to get it working.
Originally, I had this in dashboard.rb:
section "Daily Acquisition", do
render 'signups', :start_date => 1.month.ago
end
And to get it to work, I had to wrap it in a div like this:
section "Daily Acquisition", do
div render('signups', :start_date => 1.month.ago)
end
section "Business Summary", do
div render ('graph')
end
Doesn't work for me, the partial doesn't render and I only get a blank section...
Here's an example that works. I didn't have the div do end and my partial didn't display.
section "Search Links", :priority => 1 do
div do
render 'search_links'
end
end