Re: Simple rails website design question

hi eggie5, you could read this book “Apress - Beginning Ruby On Rails
E-Commerce - From Novice To Professional”,there are examples just you
mentioned bellow

----- Original Message ----
From: eggie5 [email protected]
To: Ruby on Rails: Talk [email protected]
Sent: Thursday, September 13, 2007 11:37:59 AM
Subject: [Rails] Simple rails website design question

I want to make a simple website with rails, but I’m confused about how
to setup my controllers. Here’s what I want:

5 pages: Home, Products & Services, Press Center, White Papers & About

So, I’m confused about how to set this up. Should each page have it’s
own controller, e.g.:

home_controller, products_controller, press_controller,
white_papers_controller and about_us_controller

Is this a wise design decision?

I would like to use a layout “template” for all the pages. How then,
if I’m using independent controllers for each page do I share a

All the rails site examples I’ve found are kinda non-standard sites
with only 1 real page, like a shopping cart, so I’m not sure how to
structure my rails app for a site with many pages.

Can you cite any examples?

Building a website is a piece of cake. Yahoo! Small Business gives you
all the tools to get online.

You could have home controller with subpages as actions. Like
…/home/products … with /home/index beeing default.

But then again if you like more restful approach you could create all
those controllers and put a single redirect_to into each one of them and
stil have single (complicated) source file.

If you have more controllers but want a single layout than name your
layout ‘application.rhtml’. This layout is valid for all controlers
that do not have their own layout defined.