content_for
上部に複数が必要なさまざまなページがあります。
- content_for :title, AppConfig.product['slogan']
- content_for :class, 'brand'
それは私のレイアウトで使用されています:
== render 'layouts/top_wrapper'
main[class="view-#{yield(:class)}-wrapper"]
section[class="content-outer-wrapper"]
div[class="row"]
div[class="large-12"]
div[class="content-inner-wrapper"]
div[class="row"]
div[class="large-12 large-centered columns text-center section-title"]
h1
== yield(:title)
div[class="row"]
div[class="large-12 large-centered columns"]
== yield
== render 'layouts/bottom_wrapper'
それらを単一の content_for にマージする方法があるかどうか疑問に思っていましたか?