Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Flash message don't clear

#6120

In all request the flash is a same.

Reported by Rafael Mendonça França · December 6th, 2010 @ 02:57 PM

State: stale
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Falk Pauser
    Falk Pauser

    Could you please show us some code and give more details about the problem?

    December 6th, 2010 @ 03:15 PM

  2. Rafael Mendonça França
    Rafael Mendonça França

    Sorry. I think that this behavior occurs because I set the session_store like this:

    App::Application.config.session_store :cookie_store, :key => '_app_session', :domain => :all
    

    My application have many subdomains. In the default subdomain the flash behaves properly. But, inside subdomains, the flash has the same content in all requests.

    December 6th, 2010 @ 03:25 PM

  3. Fjan
    Fjan

    Could it be that there is still a cookie on the system from before you set :domain => all? If that's the case then the browser will send both session cookies and rack will pick the first one it gets, which may not be the one you want.

    December 6th, 2010 @ 03:40 PM

  4. Rafael Mendonça França
    Rafael Mendonça França

    I clear all the cookies, but get the same flash message.

    But, I change the :domain option for the my domain name instead of :all and the flash message works fine.

    With :all option the application generate a cookie for all subdomains. I think it's like Fjan said, the rack pick the first one that have the same flash message.

    It's works now. Thank you guys.

    December 6th, 2010 @ 03:46 PM

  5. rails
    rails
    • Tag changed from 3.0.3, flash to 303, flash
    • State changed from new to open

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

    March 7th, 2011 @ 12:00 AM

  6. rails
    rails
    • State changed from open to stale

    March 7th, 2011 @ 12:00 AM