Sharing popover.rhtml among different partials

Hello,

I have product page and in that there are different containers (Product
description, Owners, etc)… Each container have “edit” button and when
user
click on edit button, a popover window is open with the content in
editable
mode (Similar to G+ profile editing). I have code for popover in
shared/_popover.rhtml shown as follow:

When Product description is in edit mode…it has title “Edit
Description”
and body has Product Description in editable mode. However, when I click
edit for owners…it will show title for Product Description and in body
area it will show Product Description and Owners in editable mode.

So, Finally I am writing individual popver for different containers. Can
anyone guide me how can I re-use above popover code for all the editable
container on my page.

PS: on my page every container is partials (eg product description is
partial and owner is partial as well).
I looked into content_for as well…but it not working as excepted.

For example please go to your Google+ profile and try to edit
something…I
m trying to achieve same thing.

Thanks
Viral