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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Joe Lewis 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! > JoeThe 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. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Apr 19, 11:42 am, Alex Wayne <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> 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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 On Apr 19, 3:04 pm, Joe Lewis <joele...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Apr 19, 11:42 am, Alex Wayne <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > 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--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---