railsのcontent_forとyieldの使い方でちょっとハマったのでメモ
layout/application.html.erb
---------------------------------------------
<%= yield :before_header %>
<%= render :partial => "shared/header" %>
<%= yield :after_header %>
<%= yield :before_yield %>
<%= yield %>
<%= yield :after_yield %>
<%= yield :before_footer %>
<%= render :partial => "shared/footer" %>
<%= yield :after_footer %>
---------------------------------------------
welcome/index.html.erb (yield)
---------------------------------------------
<%= render :partial => "welcome/index_header" %>
<h1>いらっしゃい</h1>
<%= render :partial => "welcome/index_footer" %>
---------------------------------------------
みたいになってるときに
▼shared/_header.html.erb
content_for :before_header, 'OK'
content_for :after_header, 'NG'
▼shared/_footer.html.erb
content_for :before_footer, 'OK'
content_for :after_footer, 'NG'
▼welcome/index.html.erb
▼welcome/_index_header.html.erb
▼welcome/_index_footer.html.erb
content_for :before_yield, 'OK'
content_for :after_yield, 'OK'