Multiple Tables in Single Resource?

I’m new to Ruby/Rails, so bear with me while I try to explain what I’m
looking to do. If someone doesn’t have time to explain, but could
nudge me in the right direction, I’d really appreciate any help at
all.

I’m looking to setup a site that has multiple sections each using a
single resource with different tables. The best way I can describe it
is, lets say I have two different blogs.

first_blog
second_blog

I want them to use a single Post resource in that…

first_blog/posts/1
second_blog/posts/1

pulls up two different entries.

Now I’m thinking the best way to do this to nest the resource within
each blog, but I need each Post to use a separate table. In other
words, first_blog may have a title and body row in the table and
second_blog may only have a body row and some date.

Again, I’m new to all this, so I appreciate any attempts and trying to
figure out what I’m looking for and suggestions on how to actually do
it.

Thanks

I’m not really sure if I’m asking the right question. So here is a
little more information.

I’m attempting to put together an admin section to store posts for
several different sections of a site. I’d like to have it setup like
so.

http://www.website.com/section/1/posts/1
http://www.website.com/section/2/posts/1

I could nest the post within the section and link the tables together
in the database, but can I create multiple tables, one for each
section?

The first section might need four columns in it’s table and the second
may need only one column in it’s table.

If this a completely moronic way of setting this up, please let me
know that as well.

Thanks Again.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs