Shikha Sharma
2008-Aug-22 04:09 UTC
Can a project use another projetc''s model, controller,files?
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. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Brian Hogan
2008-Aug-22 04:12 UTC
Re: Can a project use another projetc''s model, controller,files?
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 Sharma < rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > 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. > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ajit
2008-Aug-22 15:47 UTC
Re: Can a project use another projetc''s model, controller,files?
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 Sharma <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> 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. > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Shikha Sharma
2008-Aug-25 05:11 UTC
Re: Can a project use another projetc''s model, controller,fi
Hello Ajit, Hey it sounds good. Can you guide me how you shared model in two projects? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ryan Bigg
2008-Aug-25 05:13 UTC
Re: Can a project use another projetc''s model, controller,fi
I think one application''s the best way to go about this too. I even wrote a tutorial on namespacing: http://frozenplague.net/2008/03/16/administration-namespacing/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---