20 lines
494 B
Plaintext
20 lines
494 B
Plaintext
= content_for :demo do
|
|
%h1 This is content yielded from a content_for
|
|
|
|
.demo= yield_content :demo
|
|
|
|
= content_for :demo2 do |fname, lname|
|
|
%h1 This is content yielded with name #{fname + " " + lname}
|
|
|
|
.demo2= yield_content :demo2, "Johnny", "Smith"
|
|
|
|
.demo_has_content= content_for?(:demo)
|
|
.fake_has_content= content_for?(:fake)
|
|
|
|
= content_for :demo3 do
|
|
%p{:class => "duplication"} One
|
|
= content_for :demo3, :flush => true do
|
|
%p{:class => "duplication"} Two
|
|
|
|
.demo3= yield_content :demo3
|