I am writing my first RoR app.
I have used the following command to create several pages:
$ rails generate controller home index (I created home, news, gallery,
contact,...)
I created the menus in app/views/layouts/application.html.erb :
<div id="menu">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/news">News</a></li>
<li><a href="/gallery">Gallery</a></li>
<li><a href="/membership">Membership</a></li>
<li><a href="/sponsors">Sponsors</a></li>
<li><a href="/faq">FAQ's</a></li>
<li><a href="/shoot">Shoot Info</a></li>
<li><a href="/contact">Contact</a></li>
</ul>
If I click on one of the menu button "Gallery", I get:
Routing Error
As a tip (I’m kind of new in rails), I only generate the models and after that I manually create the controllers/views and also modify the routes.rb (that file has good examples about routing )
I started with rails g scaffold, but sometimes it’s not what I need, that’s why I started to create my models first.
I usually go ahead and use scaffolding, but then delete what I don't
intend to use. It's a lot easier than making sure I remember to put
all the pieces in.