I am definitely starting to loath the whole Ruby on Rails experience. I have been endeavouring to get something as simple as sessions to work. I am either connected or not. Well that all sounds good. Except for the fact that I am connected when I shouldnt be. Following the learningrails screencasts, I add authentication to the application. I add the before_filter to all the relevant controllers. However when I logout, i stay logged in. AAAARRRRGGHHHH!!!!The thing that has stood out for me with Ruby, that they said ad nauseum on the learningrails webcast series, developing with Ruby is MORE FUN. Well in my experience NOT is actually more the case. It is more infuriating than anything else I have ever had to program. When it works it is good. When it doesnt my only response is AAAARRRRGGHHHH!!!!
What this Blog is About
Sunday, July 19, 2009
Workshop 6/7: Login Headache
You may have read my rant on the developer forum about ROR giving me a headache. Well here is my expanation of my issue.
I have followed the learningrails webcast series for developing web applications, and you may notice that the css that I have used in my OTBS comes straight from them. In webcast 10 and 11 they develop or introduce the sessions controller and include the AuthenticatedSystem.
My problem arises from the fact that no matter what i seem to do the authentication controller seems to think I am logged in.
Below is a screen shot of my application.html.erb file:
Unless I have completely got it wrong, the "logged_in?" is not getting changed, and the session is staying live (so to speak), which really makes it impossible to test my application correctly.
If the user is not logged in I dont want them to be able to book a cab. Unfortunately, I always seem to be logged in.
So to reiterate what I said on the developer forum(on 8th July):
Subscribe to:
Post Comments (Atom)
Hi Grant,
ReplyDeleteI too had issues with the Learning Rails podcasts but it was a different problem. This is what I suggest you do:
Download the version of the application from the Lesson Page and try it. I know that their version at Lesson 14 works perfectly. (see my blog postings under the Learning Rails Podcasts).
Compare your application against the Learning rails one and hopefully you will find a difference.
Don't forget to stop and start your web server for any changes you make to take effect.
Good Luck.
Karen
Are you using the restful_authentication plugin that they use in the Learning Rails podcasts?
ReplyDelete