Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Session expires randomly after clicking in groups view #722
@jerboaa Is the sandbox the one built off the master branch?
@baadshah02 this is after your fix for all the groups actions went in? I suspected it wouldn't work because you are doing a link_to() with a :method other than :post. I remember bringing it up in codereview.
Anyhow, in reality it "should" work if we have the up-to-date prototype-ujs support for rails, which I'm not sure we do. As it stands, looks like something is funky with our prototype-ujs that is causing these problems. I think that's where we should investigate. Not positive, but I don't think it has anything to do with cookies.
I ran into similar problems when working on the link_to() stuff. If you try to use link_to() to do a :delete or :put, then it just returns a "302 redirect" and logs you out of the system.
@hansonwu yes i think you're right. I remember you mentioned it in the code review but I might have missed this scenario at the time being. I think I did encounter this issue, but I thought it was because I let session be idle for too long. I did some digging and found that link_to() causes errors for any links other than GET. The most apt solution i found so far is to use button_to() but we can't use that in this case. @hansonwu, @jerboaa, do you have any suggestions as to what we can do to fix this?
@baadshah02 I'm doubtful that we'll be able to use buttons on this page. It would clutter things too much. Having said that, if there is an easy way to create an image button that could work. Something like
might work. See
Back to trying to fix link_to: What is the order of included js files on this page? See http://railsforum.com/viewtopic.php?id=38460 Have you tried putting rails.js last?