Noob ?: application design

W

Wendy Putler

I am trying to write my first ruby on rails app and I am having a little
trouble with the design. I can see 2 ways to do it , but I'm sure that
I'm not entirely understanding the whole controller/action/layout/view
thing and want to get opinions on the best approach.

my database has 4 tables: 1) entries, which has many: 2) addresses, 3)
contacts, 4) people

The first part of my application is to present a user with the options
necessary to manage their own entries. The menu looks like:

My Entry
people
addresses
contacts (note: these are email addresses and phone numbers)

I created a controller called "listing" and was going to use its layout
to present all the different data. My choices seem to be:

a) pull the data into the listing's view by making a
"view/listing/contact.html" and having "contact" as an action in the
"listing" controller

b) have the listing controller refer back to the other controllers
so clicking on contacts would refer to "contacts/list.html"

Choice (b) seems to be the better way to go, but I don't want to put the
listing layout as the default for the contacts controller because it
will be presented different ways eventually.

Thanks for any guidance.
/Wendy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top