# main_layout.html.erb
<html>
<head>
</head>
<body>
<div>
<%= render 'sub_layout' %>
</div>
</body>
</html>
This will look for a file _sub_layout.html.erb
in the same folder as main_layout.html.erb
If the _sub_layout.html.erb
is not in the same folder as main_layouts.html.erb
you need to define the complete path <%= render 'your/path/to/sub_layout' %>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…