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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:38:49+00:00 2026-05-20T11:38:49+00:00

Using Rails 3.0.3 running in Passenger we’re experiencing an issue where the last flash

  • 0

Using Rails 3.0.3 running in Passenger we’re experiencing an issue where the last flash set is retained for every request. For example we’re setting a flash message if the user needs to be logged in in a before filter:

def require_user
    unless current_user
        store_location
        flash[:notice] = "You must be logged in to access this page"
        redirect_to login_url
        return false
    end
end

However on any subsequent request after the user has logged in successfully we still get the flash message persisting, it never clears for the entire session.

In this example this is the only place we are setting this message and I have ensured that it is only being set when the user is not logged in. In fact if I put flash[:notice] = 'Test' after the unless block refreshed and then removed that line and the ‘Test’ flash message remains for all subsequent requests.

This is happening if you run the app in either development or production env.

  • 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-20T11:38:50+00:00Added an answer on May 20, 2026 at 11:38 am

    We had a custom override for Hash#symbolize_keys! that was hanging around from some old code and it appears that when the cookie middleware is calling symbolize_keys! on the cookie it was causing the flash to be re-applied on the end of the request.

    I doubt anyone else will experience this issue, but in our case this is what the problem was.

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

Sidebar

Related Questions

I'm using Rails 3.0.0 + passenger + apache2 running on Ruby 1.9.2p290 on an
How would I go about running two separate Rails applications using Phusion Passenger with
I'm using Apache + passenger for my rails application, The application is running fine
I'm running Rails 3.1.2 on Apache with the latest Passenger, 3.0.11. I'm using force_ssl
We have a web app running on Rails, using Devise and OmniAuth for user
The server is running off Ruby on Rails. Javascript is written using Coffeescript. I
We're using EngineYard Cloud to deploy our Ruby on Rails application. We are running
I'm making HAML/SASS changes for a Rails app which I'm running locally using a
Using RAILS 2.2 Hello I am having an issue where my dates are being
I am attempting to run my rails app using Passenger and Apache. As far

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.