atom feed3 messages in org.rubyonrails.railsRe: Session lost in Internet explorer
FromSent OnAttachments
Nick LinnellOct 27, 2005 8:02 am 
Nick LinnellOct 27, 2005 9:16 am 
Rodrigo Alvarez FernándezOct 27, 2005 2:02 pm 
Subject:Re: Session lost in Internet explorer
From:Nick Linnell (
Date:Oct 27, 2005 9:16:39 am

I've managed to fix this now. The problem was to do with the domain name containing an underscore '_'. An IE bug?

Nick Linnell wrote:


I've got an issue with session variables being lost in internet explorer. I have build a login system using the example used in Athentication ([1] in the rubyonrails wki. It works fine in Firefox but in IE my session variable is lost. If I check the value of @session["user"] after it is set in the login controller it has a value but in the next page the variable is empty

Am i doing something wrong? Thanks Nick

my code is as follows:


def authenticate if details = User.authenticate(@params[:login]["username"], @params[:login]["password"]) @session["user"] = details if @session["user"]["user_level"] == 1 redirect_to :controller => 'apps', :action => 'list' else redirect_to :controller => 'bugs', :action => 'list' end else flash["notice"] = "Login failed" redirect_to :action => 'index' end end

bug_controller.rb before_filter :authenticate

def index # stuff end

protected def authenticate unless @session["user"] redirect_to :controller => 'login' return false end end


_______________________________________________ Rails mailing list [2]Rails-1W37MKcQCpIf0INCOvqR/ [3]

-- Nick Linnell Kyanmedia Ltd 01483 548282 [4]


Visible links 1. 2. mailto:rails-1w37mkcqcpif0incovqr/ 3. 4.