# A way to have partials outside of the app/ directory?

**URL:** <https://www.ruby-forum.com/t/a-way-to-have-partials-outside-of-the-app-directory/127066>\
**Category:** Rails\
**Created:** [January 24, 2008, 5:50pm UTC](https://www.ruby-forum.com/t/a-way-to-have-partials-outside-of-the-app-directory/127066 "2008-01-24T17:50:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinnie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/71e660/32.png) [@vinnie](https://www.ruby-forum.com/u/vinnie)\
**Post date:** [January 24, 2008, 5:50pm UTC](https://www.ruby-forum.com/t/a-way-to-have-partials-outside-of-the-app-directory/127066/1 "2008-01-24T17:50:21Z")

</div>

I am building a site where only one section is dynamic the rest I want  
to serve statically. Is there a way to use erb in the public/ folder  
with static html pages?

---

<div class="post-metadata">

**Author:** ![vinnie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/71e660/32.png) [@vinnie](https://www.ruby-forum.com/u/vinnie)\
**Post date:** [January 25, 2008, 3:11am UTC](https://www.ruby-forum.com/t/a-way-to-have-partials-outside-of-the-app-directory/127066/2 "2008-01-25T03:11:18Z")

</div>

You can just create the views and partials normally in the folder. If  
you want to serve pages statically (or even just pieces of pages  
statically) you should really just perform caching. You should perform  
some level of caching on all your pages anyways. If you use page caching  
then you will effectively be serving static pages anyways but this is  
just the proper way to do it.

[http://www.railsenvy.com/2007/2/28/rails-caching-tutorial](http://www.railsenvy.com/2007/2/28/rails-caching-tutorial)
