RE: agile depot app login failure :(


#1

Hi Dan,

Good suggestion - but alas no :frowning: checked in IE as well - but the
behavior is the same.

http://127.0.0.1:3000/login/add_user

I captured the header and I can see there is a 302 redirect:

GET /login/add_user HTTP/1.1

Host: 127.0.0.1:3000

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12)
Gecko/20050915 Firefox/1.0.7

Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plai
n;q=0.8,image/png,/;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Cookie: _session_id=531248c754a353db2d85f51b885e6e2c

HTTP/1.x 302 Found

Cache-Control: no-cache

Connection: Keep-Alive

Date: Tue, 25 Apr 2006 20:50:48 GMT

Content-Type: text/html; charset=UTF-8

Server: WEBrick/1.3.1 (Ruby/1.8.4/2005-12-24)

Content-Length: 99

Location: http://127.0.0.1:3000/login/login

Set-Cookie: _session_id=531248c754a353db2d85f51b885e6e2c; path=/

Cheers,

Luke


From: removed_email_address@domain.invalid
[mailto:removed_email_address@domain.invalid] On Behalf Of Dan V.
Sent: 25 April 2006 21:27
To: removed_email_address@domain.invalid
Subject: Re: [Rails] agile depot app login failure :frowning:

Hi Luke.

It looks like it can’t find the user_id from the session. Check if you
have cookies disabled in your browser.

Cheers,

Dan.

On 4/25/06, Luke H. removed_email_address@domain.invalid wrote:

Hi *,

In an attempt to go back to the drawing board and learn RoR some more -
I have built the depot application from the agile book.

After finishing I tried to create a user for the admin section, however
when ever I go to:

http://localhost:3000/login/add_user

It redirects to the login action, I don’t see the [add user] submit
button??

I am sure this is connected to the application.rb

def authorize
unless session[:user_id]
flash[:notice] = “Please log in”
redirect_to(:controller => “login”, :action => “login”)
end
end
en

To trace if this may have been a typos by yours truly - I replaced all
of the files with the ones from the pragmatic site and I am still facing
the same issue?

Did anyone else come across a similar issue when working through the
agile book?

Cheers,
Luke