Doubt with helper

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

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

<%= yield :meta %>

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 %>

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs