# Doubt with helper

**URL:** <https://www.ruby-forum.com/t/doubt-with-helper/174152>\
**Category:** Rails\
**Created:** [August 21, 2009, 12:07pm UTC](https://www.ruby-forum.com/t/doubt-with-helper/174152 "2009-08-21T12:07:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexander](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bc8723/32.png) [@alexander](https://www.ruby-forum.com/u/alexander)\
**Post date:** [August 21, 2009, 12:07pm UTC](https://www.ruby-forum.com/t/doubt-with-helper/174152/1 "2009-08-21T12:07:11Z")

</div>

Hi all

I need help

I have in my application helper this function:

def example  
content\_for(:meta) do  
‘okis dokis’  
end  
end

And in my main layout view:

…

- yield(:meta)  
…

And in other view layer this:

…

- example  
…

In development mode all this works, but in production in a server  
doesn’t work.  
what is the problem, I can’t explain

---

<div class="post-metadata">

**Author:** ![alexander](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bc8723/32.png) [@alexander](https://www.ruby-forum.com/u/alexander)\
**Post date:** [August 21, 2009, 4:31pm UTC](https://www.ruby-forum.com/t/doubt-with-helper/174152/2 "2009-08-21T16:31:11Z")

</div>

You should show some actual code so that people can assist you.

\<%= yield :meta %\>

---

<div class="post-metadata">

**Author:** ![alexander](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bc8723/32.png) [@alexander](https://www.ruby-forum.com/u/alexander)\
**Post date:** [August 22, 2009, 7:31pm UTC](https://www.ruby-forum.com/t/doubt-with-helper/174152/3 "2009-08-22T19:31:29Z")

</div>

Ok

this is application helper:

module ApplicationHelper  
def seo\_meta  
content\_for(:meta) do  
“”  
end  
end  
end

My template (application.html.erb):

\<%= yield(:meta) %\>  
…

My other view that yields (index.html.erb):

\<%= seo\_meta %\>
