# Different renders on main page

**URL:** <https://www.ruby-forum.com/t/different-renders-on-main-page/152759>\
**Category:** Rails\
**Created:** [November 7, 2008, 6:34am UTC](https://www.ruby-forum.com/t/different-renders-on-main-page/152759 "2008-11-07T06:34:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![panatura](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@panatura](https://www.ruby-forum.com/u/panatura)\
**Post date:** [November 7, 2008, 6:34am UTC](https://www.ruby-forum.com/t/different-renders-on-main-page/152759/1 "2008-11-07T06:34:47Z")

</div>

Hi all,

just want to know how to act:

It’s some kind of community website and at the main site I want to have  
different boxes with information from differen models -\> new users, new  
news, etc.

How to set up? Do I need to render partials in each div, therefore I  
need to set instances, do I?

In fact it’s nothing more than requesting one controller (at index\_url)  
with some models?

How do you do? What do you think about that?

Kind regards  
Mario

---

<div class="post-metadata">

**Author:** ![panatura](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@panatura](https://www.ruby-forum.com/u/panatura)\
**Post date:** [November 7, 2008, 11:21am UTC](https://www.ruby-forum.com/t/different-renders-on-main-page/152759/2 "2008-11-07T11:21:43Z")

</div>

Just as you say. Nothing special about requesting data from lots of  
different  
or unrelated models for such usage.

In the controller get the data like:

@new\_users = User.find(:all, :conditions =\> _whatever means new_)  
@new\_news = News.find(:all, :conditions =\> …)

In the view it’s a matter of taste if you write a different partial  
for each box or not. I would most likely do it, or reuse some other  
partials for displaying users or new, that are already written.
