This project is archived and is in readonly mode.

#6120 ✓stale
Rafael Mendonça França

Flash message don't clear

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

In all request the flash is a same.

Comments and changes to this ticket

  • Falk Pauser

    Falk Pauser December 6th, 2010 @ 03:15 PM

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

  • Rafael Mendonça França

    Rafael Mendonça França December 6th, 2010 @ 03:25 PM

    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.

  • Fjan

    Fjan December 6th, 2010 @ 03:40 PM

    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.

  • Rafael Mendonça França

    Rafael Mendonça França December 6th, 2010 @ 03:46 PM

    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.

  • rails

    rails March 7th, 2011 @ 12:00 AM

    • 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.

  • rails

    rails March 7th, 2011 @ 12:00 AM

    • State changed from “open” to “stale”

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Tags

Referenced by

Pages