I think the idea was to make a link act as a form button. This may be
ok if you are using this css class on a link inside a form of yours.
But what happens if you are using a link_to .... :method => "post" ?
Multiple redirects!!! that's what was happening to me at least. So my
advice would be: look for rare javascript calls (unobtrusive calls?)
around the view that is failing with that redirect message.
Finally i debugged this error, this is becoz of non-commenting the
line to save the session as active_record. So that in my production
server, i doesnt have permission to create a new file for each
session. so that session is get expired then logged out automatically.
I have only read and execute permission in the production server. once
I have removed the comment, sessions are get saved into my DB, then
sessions get reliable as usual.