# STI or MTI design?

**URL:** <https://www.ruby-forum.com/t/sti-or-mti-design/170669>\
**Category:** Rails\
**Created:** [June 20, 2009, 8:05pm UTC](https://www.ruby-forum.com/t/sti-or-mti-design/170669 "2009-06-20T20:05:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [June 20, 2009, 8:05pm UTC](https://www.ruby-forum.com/t/sti-or-mti-design/170669/1 "2009-06-20T20:05:11Z")

</div>

I am trying to implement a directory structure (Libraries can contain  
other Libraries or Documents)  
using the plugin ‘awesome\_nested\_set’

if lfe was simple (only Libraries) it would be over already, but I  
don’t see yet how to design the models to handle also Documents in the  
tree …

should I define an Item model, with acts\_as\_nested\_set and have  
Library model and Document model inherate from Item ?

or work only with the Library acts\_as\_nested\_set and manage the  
Document as a List ?

some guidance would be welcome … ( a lot…)

erwin
