I’ve posted some days ago about the lack of proper documentation for the
testing framework used by Rails.
Today, among other days, I noted one more method missing documentation.
I’ve read the past year about nested layouts in some blog I don’t
Today I had to write a new application and needed the nested layouts
First, I looked at the documentation, as I use to do. Didn’t find. Then
looked at my other project code and found how, although I couldn’t find
this feature documented.
Into the documentation there are references for:
But none of them had any documentation available (although I’m not sure
these are the methods I should be looking for. Maybe it should be
Well, the requirements are quite simple, so is the solution, but finding
on documentations is impossible, unless I’m missing something.
To keep it clear, here is the actual case:
I want to have a master layout (application.erb) and another layout
(another.erb) for the AnothersController, based on master layout.
application.erb:... <%= yield :further_header %> ...
<% content_for :further_header do %>
Further content here
<% end %>
<%= render ‘layouts/application’ %>
Quite simple, don’t you think? So what am I complaining about? This is a
very useful hidden feature. It is not documented. Even worse, the render
method is not documented. And even if I didn’t care about others
this feature, I would care if this feature will continue working in the
next Rails releases. Once a feature is documented, there is a great
it will continue to be supported…
I would like to help documenting such missing documentation, but I need
instructions how can I do that: how to make patches, and need to know
do these methods actually work.
Thanks in advance,