Pick a name that pluralizes nicely, for example:
generate rspec_scaffold HelpScreen key:string content:text
You can also edit config/initializers/inflections.rb to specify your
singular / plural rule but understand that help / help won''t work
without the manual munching you''ve been doing.
On Feb 17, 7:57 am, Michael Graff
<skan.gryp...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Yes, I know the irony of asking for help with a help controller. :)
>
> The intent here is to have a place to put common help messages,
> nothing complicated at the beginning at least. I created a help
> controller, but of course the rspec_scaffold generator called it, and
> the path generated, ''helps''. I tend to think /helps/...
is a path
> that might indicate we need a better translator, so I added this to my
> routes.rb file:
>
> map.resources :help
>
> This seems to have taken care of most of it. Since right now all the
> terms come from an internal, non-database-backed array, I have no need
> (currently) for the other methods, so I added :only => [:index, :show]
> to this. However, I also want an entry page which doesn''t just
list
> all possible status codes, I added :collection => { :all => :get } as
> well.
>
> Now, this works, but it was a lot of manual renaming of files.
>
> The question is, what are others doing for this sort of thing? /helps
> just seems so... wrong, but everything behind it would be RESTful.
> /help/ won''t map into certain paradigms of automatic resource
mapping,
> but I like it better for the user to see on the screen.
>
> Thanks,
> --Michael
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---