capture_html helper tests

This commit is contained in:
Karl Freeman 2013-06-07 09:58:37 +01:00
parent d728df12cf
commit 0b8c36cb8c
6 changed files with 40 additions and 0 deletions

View file

@ -0,0 +1,5 @@
<% capture_html :from_template do %>
<h1>I am the yielded content erb</h1>
<% end %>
I am in the template

View file

@ -0,0 +1,4 @@
- capture_html :from_template do
%h1= "I am the yielded content haml"
%p I am in the template

View file

@ -0,0 +1,4 @@
- capture_html :from_template do
h1 I am the yielded content slim
| I am in the template

View file

@ -0,0 +1,4 @@
In Layout: <%= yield_content(:from_template) %>
In Template:
<%= yield %>