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 8739351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:55:18+00:00 2026-06-13T10:55:18+00:00

I can’t understand how this happens. Show source on my page starts like this

  • 0

I can’t understand how this happens. Show source on my page starts like this — yes that is the very start of the html, and I have double checked it in Chrome and Safari…

        </div>
    </div>
  </div>
<!DOCTYPE html>
<html>
<head>
  <title>Rstest</title>
  <link href="/assets/application.css?body=1" media="all" rel="stylesheet" type="text/css" />
<link href="/assets/bootstrap_and_overrides.css?body=1" media="all" rel="stylesheet" type="text/css" />
<link href="/assets/custom.css?body=1" media="all" rel="stylesheet" type="text/css" />

Yet my application.html.erb starts like this:

<!DOCTYPE html>
<html>
<head>
  <title>Rstest</title>
  <%= stylesheet_link_tag    "application", :media => "all" %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>

I can’t think of scenarios that would cause this…

Here are some more details, from log:

Rendered reports/report.html.erb within layouts/reptabs (1093.5ms)
Rendered layouts/application.html.erb (12.8ms)

And here are the relevant views:

application.html.erb:

<!DOCTYPE html>
<html>
<head>
  <title>Rstest</title>
  <%= stylesheet_link_tag    "application", :media => "all" %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>
</head>
<body>

<header class="navbar navbar-fixed-top">
  <div class="navbar-inner">
    <div class="container">
      <%= link_to "Repeat Survey", '#', id: "logo" %>
      <nav>
        <ul class="nav pull-right">
          <li><%= link_to "Home", '#' %></li>
          <li><%= link_to "About", '#' %></li>
          <li><%= link_to "Contact", '#' %></li>
          <li><%= link_to "Help", '#' %></li>
        </ul>
      </nav>
    </div>
  </div>
</header>

<div class="container">
    <%= content_for?(:content) ? yield(:content) : yield %>
</div>

</body>
</html>

reptabs.html.erb:

<% content_for :content do %>
  <div class="container">
    <ul class="nav nav-tabs">
      <li><%= link_to "Reports", report1_path(@program_id) %></li>
      <li><%= link_to "Settings", edit_program_path(@program_id) %></li>
      <li><%= link_to "Rounds", program_rounds_path(@program_id) %></li>
      <li><%= link_to "Participants", program_participants_path(@program_id) %></li>
      <li><%= link_to "Questions", program_questions_path(@program_id) %></li>
    </ul>

    <div class="container">
      <div class="row">
        <div class="span2">
          <ul class="nav nav-pills nav-stacked">
            <li><%= link_to("q r p", report1_path(@program_id)) %></li>
            <li><%= link_to("r q p", report2_path(@program_id)) %></li>
            <li><%= link_to("p r q", report3_path(@program_id)) %></li>
            <li><%= link_to("p q r", report4_path(@program_id)) %></li>
          </ul>
        </div>
        <div class="span9">
            <%= content_for?(:reptabs_content) ? yield(:reptabs_content) : yield %>
          <% end %>
        </div>
    </div>
  </div>
<%= render :template => 'layouts/application' %>

report.html.erb:

<h2>Report</h2>
  <p>
    <%= @presenter.to_s %>
  </p>

<table class="table table-striped">
  <thead>
    <tr>
      <th>....</th>
      <% @presenter.headers.each do |hdr| %>
        <th><%= hdr %></th>
      <% end %>
    </tr>
  </thead>
  <tbody>
    <% @presenter.rows.each do |row_instance| %>
      <tr>
        <td><%= @presenter.row_label(row_instance) %></td>
        <% @presenter.cols.each do |col_instance| %>
          <td>
            <%= @presenter.cell(row_instance, col_instance).count %> =>
            <%= @presenter.cell(row_instance, col_instance).join(", ") %>
          </td>
        <% end %>
      </tr>
    <% end %>
  </tbody>
</table>

I wonder if I am messing something up with my content_for statements?

  • 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-13T10:55:19+00:00Added an answer on June 13, 2026 at 10:55 am

    You should move the end in the content_for loop down like this
    reptabs.html.erb:

    <% content_for :content do %>
      <div class="container">
        <ul class="nav nav-tabs">
          <li><%= link_to "Reports", report1_path(@program_id) %></li>
          <li><%= link_to "Settings", edit_program_path(@program_id) %></li>
          <li><%= link_to "Rounds", program_rounds_path(@program_id) %></li>
          <li><%= link_to "Participants", program_participants_path(@program_id) %></li>
          <li><%= link_to "Questions", program_questions_path(@program_id) %></li>
        </ul>
    
        <div class="container">
          <div class="row">
            <div class="span2">
              <ul class="nav nav-pills nav-stacked">
                <li><%= link_to("q r p", report1_path(@program_id)) %></li>
                <li><%= link_to("r q p", report2_path(@program_id)) %></li>
                <li><%= link_to("p r q", report3_path(@program_id)) %></li>
                <li><%= link_to("p q r", report4_path(@program_id)) %></li>
              </ul>
            </div>
            <div class="span9">
                <%= content_for?(:reptabs_content) ? yield(:reptabs_content) : yield %>
              <!--not here -->
            </div>
        </div>
      </div>
    <% end %><!--but here -->
    <%= render :template => 'layouts/application' %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can I run this in a Windows command prompt like I can run it
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Can any one help me in sorting this out in sed/awk/perl Input file Start
Can anyone tell me how an IDE like NetBeans or any for that matter
Can anyone explain to me why this program: for(float i = -1; i <
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
Can anybody help me? What should be the datatype for this type -07:00:00 of
Can you guys help me understand a concept real quick, I'm having trouble understanding

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.