When Daniel cleaned up cruft in the Page model, he made snippets
render on the global page, i.e. tag.globals.page. In r601, I changed
r:content to be rendered by the global page too. What this does is
maintains tag.globals.page as the currently rendering page. It’s a
pretty ingenious and subtle change – we don’t create a new context
and parser, so all rendering context is retained.
Sorry, this is a roundabout way of saying, use tag.globals.page
instead of tag.globals.actual_page.
When Daniel cleaned up cruft in the Page model, he made snippets
render on the global page, i.e. tag.globals.page. In r601, I changed
r:content to be rendered by the global page too. What this does is
maintains tag.globals.page as the currently rendering page. It’s a
pretty ingenious and subtle change – we don’t create a new context
and parser, so all rendering context is retained.
Sorry, this is a roundabout way of saying, use tag.globals.page
instead of tag.globals.actual_page.
Sean – Thanks for the quick response. The fix worked perfectly, and the
behind-the-scenes explanation is appreciated.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.