Rubynuby == two views on one page?


This question may be one of those monumentally rtfm/do some more reading
sort of affairs.

At the moment though, it is not apparent to me how one would go about
creating a page that has two very separate rails views (say, a forum,
and a “sign up for email notification” view) on the same page.

If anybody knows of a tutorial that covers this or can explain why it’s
not a problem that would be very helpful.

Perhaps instead I’ve just opened up one of those “you should re-design
your site because this violates some important principle of good design”
sort of portals.

In any event, if the answer to this will be obvious once my rails
pedicure improves, that’s fine, or if it is a basic intentional
limitation of rails I’d like to know that too, so I don’t keep looking
for the answer around every corner.



Hey Jeff,

I think the magic you’re looking for are called partials.

Give this a read:

Hope that helps ya.