capture_html helper tests
This commit is contained in:
parent
d728df12cf
commit
0b8c36cb8c
6 changed files with 40 additions and 0 deletions
|
@ -0,0 +1,5 @@
|
|||
<% capture_html :from_template do %>
|
||||
<h1>I am the yielded content erb</h1>
|
||||
<% end %>
|
||||
|
||||
I am in the template
|
|
@ -0,0 +1,4 @@
|
|||
- capture_html :from_template do
|
||||
%h1= "I am the yielded content haml"
|
||||
|
||||
%p I am in the template
|
|
@ -0,0 +1,4 @@
|
|||
- capture_html :from_template do
|
||||
h1 I am the yielded content slim
|
||||
|
||||
| I am in the template
|
|
@ -0,0 +1,4 @@
|
|||
In Layout: <%= yield_content(:from_template) %>
|
||||
|
||||
In Template:
|
||||
<%= yield %>
|
Loading…
Add table
Add a link
Reference in a new issue