Yielding scaffold in another view best practice.

In my app I have dashboard part where all major function will perform,
besides that I have few scaffolds (question, performance etc) which I
want to display in that dashboard. I'm little confused what will the
best practice of doing this.

1) Make partial and then render that partial
2) By using content_for and then yield it

It sounds silly but I have little confusing in above two points too.

If I choose first option then how do I move from one scaffold to
another (dashboard UI / content remain unchanged only scaffold part
will effect)

I did experiment with second only but it works only in
application.html.erb instead of any other view.

Please guide me what should I do to re-factor my problem instead of
writing same code again and again.

The usual way to do this would be by rendering partials. You can
render different partials dependent on the context. Alternatively,
instead of rendering the scaffolds as partials from the dashboard,
render the dashboard as partials from the scaffold. Often this is the
simpler approach.


Rendering dashboard partial sounds good. But I leads to huge amount of
CSS code and hard coding.

Why is it any different to your original idea?


In fact I didn't write what I meant to write. Put the rendering of
the dashboard partials in layouts/application.html.erb (or another
layout used by relevant views if not everything needs the dashboard)
and yield from there for the contents.


This is what my dashboard looks like : http://awesomescreenshot.com/0925cm5j66
Now I want to render my scaffolds in that white portion. Dashboard
partial seems good to me :).