# \<%= yield %\>

**URL:** <https://www.ruby-forum.com/t/yield/191769>\
**Category:** Rails\
**Created:** [July 18, 2010, 10:36am UTC](https://www.ruby-forum.com/t/yield/191769 "2010-07-18T10:36:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [July 18, 2010, 10:36am UTC](https://www.ruby-forum.com/t/yield/191769/1 "2010-07-18T10:36:29Z")

</div>

What does \<%= yield %\> mean that someone can find in the .html.erb file  
in the “layouts” directory? Is it just rendering the data to show up on  
the page?

Thanks.

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [July 18, 2010, 12:16pm UTC](https://www.ruby-forum.com/t/yield/191769/2 "2010-07-18T12:16:18Z")

</div>

On 18 July 2010 09:36, Abder-Rahman A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> What does \<%= yield %\> mean that someone can find in the .html.erb file  
> in the “layouts” directory? Is it just rendering the data to show up on  
> the page?

Have a look at the Rails Guide on Layouts and Rendering at  
[http://guides.rubyonrails.org/](http://guides.rubyonrails.org/). It should explain it. If you have  
not already done so have a look at the other guides as well.

Colin

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [July 18, 2010, 12:43pm UTC](https://www.ruby-forum.com/t/yield/191769/3 "2010-07-18T12:43:29Z")

</div>

Colin L. wrote:

> On 18 July 2010 09:36, Abder-Rahman A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > What does \<%= yield %\> mean that someone can find in the .html.erb file  
> > in the “layouts” directory? Is it just rendering the data to show up on  
> > the page?
> 
> Have a look at the Rails Guide on Layouts and Rendering at  
> [http://guides.rubyonrails.org/](http://guides.rubyonrails.org/). It should explain it. If you have  
> not already done so have a look at the other guides as well.
> 
> Colin

Thanks Colin.
