I’m a beginner of Ruby and Rails, so this is probably an easy question.
How should I set up a simple page that does not need to have any own database tables? In my case, for example, I have a site storing songs and artists. How I want just a simple HELP page with no intelligence, just static html. I also need a BROWSE page, where the user will select whether to browse for artists or songs. This page will not have any database tables, however it will have a list of links from A-Z, provided the number of posts for each letter, so therefore it needs to have database interaction for tables it does not own by itself.
Should I just create controllers for HELP and BROWSE, or will they need models as well? Using Rails 2, which script/generate tools should I use and what should I ask them to do for me?
I usually create a PagesController that shows the static pages like about, faq or privacy.
What you have to do is generate the controller by using
then add the following in your
config/routes.rbIn your PagesController
Then you just need to add partials in
app/views/pages/