# Help controller

**URL:** <https://www.ruby-forum.com/t/help-controller/160562>\
**Category:** Rails\
**Created:** [February 17, 2009, 6:58pm UTC](https://www.ruby-forum.com/t/help-controller/160562 "2009-02-17T18:58:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgreenly](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/85f322/32.png) [@mgreenly](https://www.ruby-forum.com/u/mgreenly)\
**Post date:** [February 17, 2009, 6:58pm UTC](https://www.ruby-forum.com/t/help-controller/160562/1 "2009-02-17T18:58:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mgreenly](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/85f322/32.png) [@mgreenly](https://www.ruby-forum.com/u/mgreenly)\
**Post date:** [February 18, 2009, 3:21am UTC](https://www.ruby-forum.com/t/help-controller/160562/2 "2009-02-18T03:21:26Z")

</div>

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.
