Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6847351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:44:04+00:00 2026-05-27T00:44:04+00:00

First of all, I’m using Rails 3.1.1 and Ruby 1.9.3-p0 . After experimenting for

  • 0

First of all, I’m using Rails 3.1.1 and Ruby 1.9.3-p0. After experimenting for a few hours on my existing project and a new “sanity check” project, I can confirm that this doesn’t seem to work. I’ve tried in both HAML and ERB but here is the HAML version. First the layout file:

/ application.html.haml
- content_for :stuff, "some content"
#content
  = yield  # lets say we are in the show action

Followed by the action view:

/ show.html.haml
= content_for :stuff

The result is that nothing gets displayed. I hope I am extremely wrong of course because I really need to be able to do this and it seems like this is one of those common scenarios. Shouldn’t this work or no? If not, could I get a suggestion on a good alternative? Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:44:04+00:00Added an answer on May 27, 2026 at 12:44 am

    So I went through the source code and I discovered that this is actually not possible because templates are rendered before the layout file. I have yet to come up with an alternative solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First of all, I'm quite new to the Android and JAVA world (coming from
I have 3 cards. at first all cards move to the right, then after
First all, I am still learning CakePHP and I am close to ZERO using
We're building an app, our first using Rails 3, and we're having to build
First of all Im new to vb 2010 and so far have enjoyed what
First of all, here's my config: VS2010/Debug/C++ Win32 Project/Vista Home Premium Invoking GetOpenFileName via
First of all (in case this is important) I'm using ActiveState's Perl (v5.8.7 built
First of all, I'm kinda new to the barcode formats and what I do
First of all, I'm using KohanaPHP Framework. I've impletemented SWFUpload successfully, working quite nice.
First of all, let me just state that I'm new to .NET so I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.