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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:46:04+00:00 2026-05-15T03:46:04+00:00

I have a strange error that came about when I changed my app from

  • 0

I have a strange error that came about when I changed my app from mongrel to mod_rails.

My app changes from a two column layout to a three column layout depending on where the user is in the app. My application layout relies on several helpers to put the divs in the right place.

In application_helper.rb:

  def left_column_layouts
   if  params[:controller] == "users" && params[:action] == "show" ||
       params[:controller] == "friendships" && params[:action] == "index" ||
       params[:controller] == "tags" && params[:action] == "index"
       true
   else
       false
   end 
end

I also have similar logic for where the three column layouts.

Then, in my layout file:

    <% if left_column_layouts %>
    <div class="colmask leftmenu">
    <div class="colleft">
  <%= yield %>
    </div>
    </div>
<% elsif three_columns_with_blank_sides %>
<div class="colmask threecol">
<div class="colmid">
<div class="colleft">
    <%= yield %>
<div class="col2">
</div>
<div class="col3">
</div>
</div>
</div>
</div>
<% else #Three column layout %>
    <div class="colmask threecol">
    <div class="colmid">
    <div class="colleft">
<%= yield %>
    </div>
    </div>
    </div>
<% end %>

This worked well until I changed to mod rails. I can’t imagine why mod rails would make this part of the app simply not work.

Interesting note: I went to the https parts of my site and the layout was loading without a problem. My server support guys said I should clear the cache but the problem persists.

Any help would be appreciated!

  • 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-15T03:46:05+00:00Added an answer on May 15, 2026 at 3:46 am

    I know that this is an old post, but just to make sure that others would see it. If I correctly understand what you want, I believe the problem lies in the logic used in your condition.

    If you want to display left column when controller:action is users:show or friendships:index or tags:index, your logic condition is incorrect. You need parentheses to correct them.

    For example, let’s say users is ‘A’, show is ‘B’, friendships is ‘C’, index of friendships is ‘D’, tags is ‘E’, and index of tags is ‘F’.

    Your code represents A && B || C && D || E && F, but I believe what you want is (A && B) || (C && D) || (E && F). Because A && B || C && D || E && F is not equal to (A && B) || (C && D) || (E && F), the method may return incorrect result. To be more clear, let say all params from A to E are true but F is false. Your method will return false which is supposed to be true. That may be the case.

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

Sidebar

Related Questions

I am getting a really strange error from ActiveResource. I have a method that
I have come across a strange error. I have an Android project that uses
I experience strange problem. We have error handling in global.asax that would redirect user
I am facing a strange error in cakephp2.0. I have created two layouts -
I came across a strange error when using NGen from .NET Framework 4 to
I have a strange error that has bothered me all day. I have a
I have a strange error in my App. In my app it is possible
I have run into a pretty strange error that I can't get my head
Very strange error indeed. I have an item that clones itself every month, setting
I have a strange XAML Error that comes up in Visual Studio. I have

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.