# Do I need to seperate admin and user area phsically in my file structure?

**URL:** <https://www.ruby-forum.com/t/do-i-need-to-seperate-admin-and-user-area-phsically-in-my-file-structure/191910>\
**Category:** Rails\
**Created:** [July 20, 2010, 3:53pm UTC](https://www.ruby-forum.com/t/do-i-need-to-seperate-admin-and-user-area-phsically-in-my-file-structure/191910 "2010-07-20T15:53:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/cc9497/32.png) [@mac](https://www.ruby-forum.com/u/mac)\
**Post date:** [July 20, 2010, 3:53pm UTC](https://www.ruby-forum.com/t/do-i-need-to-seperate-admin-and-user-area-phsically-in-my-file-structure/191910/1 "2010-07-20T15:53:48Z")

</div>

hii guys!!

m new to rails. I am about to create a simple CMS application . Do i  
need to put my files in seperate folders ?? If doing so how to follow  
rails convention. I am using scaffold to create my admin end . do I  
need to change my style…I mean do I need to write them on my own ??.

Let me explain my problem with example  
suppose I need a table called contain & I use scaffold to generate it  
table name: Content

now all files called content\_controller.rb , a view folder called  
contents & a model called content.rb

The above description is completely fine and good for admin.

know I need user end …what I am doing is creating a controller name  
user and writing action in it . User dont have any model assosiated  
with it . I will be specify in controller which model to use .

DO YOU GUYS HAVE BETTER APPROCH THEN WHAT I FOLLOW … ???

THANKS

---

<div class="post-metadata">

**Author:** ![mac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/cc9497/32.png) [@mac](https://www.ruby-forum.com/u/mac)\
**Post date:** [July 20, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/do-i-need-to-seperate-admin-and-user-area-phsically-in-my-file-structure/191910/2 "2010-07-20T16:39:06Z")

</div>

I prefer to have separate admin controllers with at the top a  
before\_filter :require\_admin to be safe.
