# Nested Templates

**URL:** <https://www.ruby-forum.com/t/nested-templates/166261>\
**Category:** Rails\
**Created:** [April 23, 2009, 9:09am UTC](https://www.ruby-forum.com/t/nested-templates/166261 "2009-04-23T09:09:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ref3at](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/85f322/32.png) [@ref3at](https://www.ruby-forum.com/u/ref3at)\
**Post date:** [April 23, 2009, 9:09am UTC](https://www.ruby-forum.com/t/nested-templates/166261/1 "2009-04-23T09:09:19Z")

</div>

I want the user to be able to toggle between view and edit modes  
within the same page without having to request a different page for  
each. I know I could just copy the code from my edit.html.erb page to  
the show.html.erb but that wouldn’t be DRY. Are there DRYer  
approaches? Is there a way of “calling”/“nesting” my edit template in  
the show template.
