restful authentication
|
|
I am running rails 1.2.3 and took the entire Restful authentication plugin from the source file, however when i tried to run my app for the first time as show on page 111 i got errors:
Allthough my code was the same as in the source file and in the book i tried something that was written in the plugin readme and changed my roots.rb file from this:
as was in the book… to this:
And now it works without problem! Has anyone else had this experience, is it just a result of things getting mixed up a bit because of using previous versions? UPDATE: I have seen on page 113 that the sessions_controller.rb is refferred to as session_controller.rb, if i generate the restful auth code with ‘session’ instead of then ‘sessions’ as the second parameter then I can leave the routes.rb code as is in the book and it works fine. |
|
|
Yeah I’ve never been a big fan of the decision to allow singular resources in Rails. |
|
|
Yes, I copy the REST authentication plugin sources in the Eldon’s project to my project of same name it,and so edit my router.rb, ActionController::Routing::Routes.draw do |map| now My project is work OK! Thanks Eldon and beta! |
|
|
Glad to hear that you got past that issue and sorry for the confusion. I learned my lesson about plugins that keep changing after the book is written with this book. So in my new book – I made sure to fork my own version of each plugin on GitHub for the readers to use. |