# Can a project use another projetc's model, controller,files?

**URL:** <https://www.ruby-forum.com/t/can-a-project-use-another-projetcs-model-controller-files/146539>\
**Category:** Rails\
**Created:** [August 22, 2008, 6:09am UTC](https://www.ruby-forum.com/t/can-a-project-use-another-projetcs-model-controller-files/146539 "2008-08-22T06:09:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shikha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bcef8e/32.png) [@shikha](https://www.ruby-forum.com/u/shikha)\
**Post date:** [August 22, 2008, 6:09am UTC](https://www.ruby-forum.com/t/can-a-project-use-another-projetcs-model-controller-files/146539/1 "2008-08-22T06:09:55Z")

</div>

i am working on a project in which we have two projects, one at admin  
side and another at viewer side and we are using the same database for  
that. now i am confused with this thing that can my admin project model,  
controllers can be used with user project side.can i share the same  
validations put in one model in admin project or i will have to create  
again in user or viewer project?

if anyone is known about this, please help me out. your help will be  
appreciable, thanks.

---

<div class="post-metadata">

**Author:** ![shikha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bcef8e/32.png) [@shikha](https://www.ruby-forum.com/u/shikha)\
**Post date:** [August 22, 2008, 6:13am UTC](https://www.ruby-forum.com/t/can-a-project-use-another-projetcs-model-controller-files/146539/2 "2008-08-22T06:13:33Z")

</div>

I’d seriously consider one project.

That said, you can share things numerous ways. Use SVN:Externals or Git  
submodules to share models / controllers across apps. Or use plugins. Or  
use  
symlinks. Or use REST with ActiveResource. 🙂

Lots of options, but the simplest is to just use the same app for admins  
and  
viewers.

On Thu, Aug 21, 2008 at 11:09 PM, Shikha S. \<

---

<div class="post-metadata">

**Author:** ![shikha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bcef8e/32.png) [@shikha](https://www.ruby-forum.com/u/shikha)\
**Post date:** [August 22, 2008, 5:49pm UTC](https://www.ruby-forum.com/t/can-a-project-use-another-projetcs-model-controller-files/146539/3 "2008-08-22T17:49:15Z")

</div>

I was involved in couple of projects with same idea. admin and client.  
We used different controllers and views but shared Models.

Ajit

On Aug 22, 12:09 am, Shikha S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![shikha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bcef8e/32.png) [@shikha](https://www.ruby-forum.com/u/shikha)\
**Post date:** [August 25, 2008, 7:11am UTC](https://www.ruby-forum.com/t/can-a-project-use-another-projetcs-model-controller-files/146539/4 "2008-08-25T07:11:45Z")

</div>

Hello Ajit,

```
 Hey it sounds good. Can you guide me how you shared model in two 

```

projects?

---

<div class="post-metadata">

**Author:** ![shikha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bcef8e/32.png) [@shikha](https://www.ruby-forum.com/u/shikha)\
**Post date:** [August 25, 2008, 7:13am UTC](https://www.ruby-forum.com/t/can-a-project-use-another-projetcs-model-controller-files/146539/5 "2008-08-25T07:13:53Z")

</div>

I think one application’s the best way to go about this too.

I even wrote a tutorial on namespacing:

> **[frozenplague.net](http://frozenplague.net/2008/03/16/administration-namespacing/)**
>
> This domain may be for sale!
