Question on restful_authentication

I attempted to run the following command using the
restful_authentication plugin and was wondering if anyone could help
shed some light on this. Here’s my problem - ran:

script/generate authenticated person session

And this generated a number of pluralized files that I thought should
be singular:

/controllers/people_controller.rb
/views/people/

And in routes.rb, I get:

map.resources :peoples

This is the only place where :peoples was found in the project, so I’m
guessing this is a pluralization issue. If I run the script against
“user” instead of “people” there is no issue, but I’d really like to
use “people” as the name. Any suggestions on how I as a Rails novice
should approach this? Should I clean it up manually, or is there a
better way to run the generate script?

Thank you for any advice!
Joe

Joe L. wrote:

I attempted to run the following command using the
restful_authentication plugin and was wondering if anyone could help
shed some light on this. Here’s my problem - ran:

script/generate authenticated person session

And this generated a number of pluralized files that I thought should
be singular:

/controllers/people_controller.rb
/views/people/

And in routes.rb, I get:

map.resources :peoples

This is the only place where :peoples was found in the project, so I’m
guessing this is a pluralization issue. If I run the script against
“user” instead of “people” there is no issue, but I’d really like to
use “people” as the name. Any suggestions on how I as a Rails novice
should approach this? Should I clean it up manually, or is there a
better way to run the generate script?

Thank you for any advice!
Joe

The filenames are correct, they are supposed to be plural.

Te route is a bit curous, its like double plural. You should just be
able to change it to:

map.resources :people

And I believe everything should just work for you with no other changes.

On Apr 19, 11:42 am, Alex W. [email protected]
wrote:

The filenames are correct, they are supposed to be plural.

Te route is a bit curous, its like double plural. You should just be
able to change it to:

map.resources :people

And I believe everything should just work for you with no other changes.

That helped, mostly. Thanks!

Creating a user worked fine. Logout worked fine. However, logging back
in yielded this problem:

NameError in SessionsController#create
uninitialized constant SessionsController

The only change I made to the session_controller.rb file was to move
the “include AuthenticatedSystem” code to the application controller.
Any suggestions out there?

Thanks much,
Joe

Just reporting that I seem to have found the error.

Running script/generate authenticated user sessions works

Sessions must be plural, or else everything will work except the login
function.

Thanks,
Joe

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs