Using layouts from database

Hi,

We generally use different layouts/themes for our accounts of gmail/ orkut. In the same i want my rails application to use different layouts choosen by a user.

All templates are saved in db and user can view all templates and apply them for their pages. So is there any plugin in rails to use dynamic layouts ? So anyone can suggest me in doing module .