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

  • Home
  • SEARCH
  • 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 7819121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T06:48:33+00:00 2026-06-02T06:48:33+00:00

I have this HAML page: -content_for :primary_content do Hmmm %strong{:class => code, :id =>

  • 0

I have this HAML page:

-content_for :primary_content do

  Hmmm
  %strong{:class => "code", :id => "message"} Hello Alex!

  .container-fluid
    .row-fluid
      .span1 Hello 1
      .span4 Hello 4
      .span4 Hello 4 again
      .span3 Hello 3

  %strong{:class => "code"} End of page!

  .container-fluid
    .row-fluid
      .span9 My Disclosures o ye!
      .span3 This will be the side area

      // Ok....what is in home?
      // The two divs....

  -content_for :primary_content do
    -if signed_in?
      // =render "sidebar/common/primary_navigation"
      // If signed in, show the options for
      // 1) Logout | My Profile
      // 2) Create disclosure | show disclosures
      Signed in
    -else
      // =render "devise/sessions/form"
      NOT Signed in

For some reason it renders Not signed in Hmmm Hello Alex! on the top line and then everything else below it.

I am confused since “Not Signed In” is on the bottom of the page, and the “hmm Hello Alex” is on top. But for some reason it renders together on the screen. Any idea why?

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-06-02T06:48:36+00:00Added an answer on June 2, 2026 at 6:48 am

    First I’d like to point out that you seem to have a nested content_for, this may be an issue.

    Secondly, I recommend separating the two content_for blocks and creating another one specifically for the login area. Something like

    - content_for :login do
      -if signed_in?
        // =render "sidebar/common/primary_navigation"
        // If signed in, show the options for
        // 1) Logout | My Profile
        // 2) Create disclosure | show disclosures
        Signed in
      -else
        // =render "devise/sessions/form"
        NOT Signed in
    

    Then put

    yield :login
    

    somewhere after

    yield :primary_content
    

    Separating concerns and making it so you don’t have any content stepping on the others toes.

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

Sidebar

Related Questions

I have this code in my HAML file with rails. = find_and_preserve f.text_area :notes
I have this Haml view: !!! strict %html{:xmlns => http://www.w3.org/1999/xhtml} %head %meta{:content => text/html;
I have this in one of my haml views: -form_for :news_item_comment, :url=>{:id => comment.id,
I have this error message: Msg 8134, Level 16, State 1, Line 1 Divide
I have this code for doing an ajax request to a webservice: var MyCode
I have this code somewhere in my controller: raise PermissionDenied When this is executed,
In a Haml based Padrino solution I have an application.haml like this: !!! %html
I have a model 'Asset' and, on the show page, I have this: {
I have a textarea which already contains some content (haml code below) //haml code
I have a model like this: class Search include Mongoid::Document embeds_many :terms accepts_nested_attributes_for :terms

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.