Re: Creating incorrect plurals when generating scaffold

s.ross
Thu, 21 Feb 2008 06:43:25 -0000

On Feb 20, 2008, at 10:38 PM, Kelly Tanguay wrote:

> I''m confused because I finally thought I''d figured out
the whole
> scaffolding thing but when I try to generate a scaffold for
"Story",
> it
> creates EVERYTHING as "stories". I even have to go to
> http://localhost:3000/stories instead of http://localhost:3000/story
> to
> see the scaffold. When I generate a scaffold for "stories" it
makes
> the
> exact same thing. Am I missing something?

You''re doing the right thing. Controllers are plural, models are
singular. You''ll have to do the translation between what''s
printed in
the book and how Rails'' scaffold works.

By observing these pluralization rules, routing becomes far easier, so
unless you''re keen to swim upstream don''t try to force
controllers
into singular form.



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---