Forum: Ruby on Rails Partial rendering results in a blank page?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Neil M. (Guest)
on 2009-04-07 20:08
I'm stuck with a bug at the moment which is puzzling me.  I have a
layout containing some HTML and a partial (for the navigation) - there
is nothing else there other than the yield.

1.  If the nav is included as a partial I get nothing returned to the
browser at all (blank page) but everything else appears normal
2.  If I remove the partial the page works fine
3.  If I put the nav code directly in the template it works fine
4.  if I replace the nav code in the partial with a simple string, I get
a blank page again.

Does anyone have any ideas as to what the problem could be, or know how
I might debug it?
Neil M. (Guest)
on 2009-04-07 20:27
Neil M. wrote:
> I'm stuck with a bug at the moment which is puzzling me.  I have a
> layout containing some HTML and a partial (for the navigation) - there
> is nothing else there other than the yield.
>
> 1.  If the nav is included as a partial I get nothing returned to the
> browser at all (blank page) but everything else appears normal
> 2.  If I remove the partial the page works fine
> 3.  If I put the nav code directly in the template it works fine
> 4.  if I replace the nav code in the partial with a simple string, I get
> a blank page again.
>
> Does anyone have any ideas as to what the problem could be, or know how
> I might debug it?

Found the issue, the partial was in the layouts folder, instead of the
relevant controller views folder.

However, Rails was throwing a ActionView::MissingTemplate Exception
which was only visible via the debugger which is probably a bug.
This topic is locked and can not be replied to.