I''ve got a couple apps that I use (billing app, support ticket app, some other custom apps) that I want to integrate into one site. They will all use the same layout for the most part, and will link between each other. When I initially thought of doing this, I figured if I put the apps at different roots - /billing /support etc - then the links wouldn''t work at all, because they''d have the app root prefix. Also I didn''t know how to manage the layout. I ended up just creating one monster app, because I needed to get it out quickly...but it really really sucks to have it be a monolithic beast when it really is three separate apps. Anyone know how I can integrate several apps into one site? Pat
On Jun 19, 2006, at 9:39 PM, Pat Maddox wrote:> When I initially thought of doing this, I figured if I put the apps at > different roots - /billing /support etc - then the links wouldn''t work > at all, because they''d have the app root prefix.Please elaborate. Are you familiar with the RAILS_RELATIVE_URL_ROOT environment variable? -- -- Tom Mornini
On 6/20/06, Tom Mornini <tmornini@infomania.com> wrote:> On Jun 19, 2006, at 9:39 PM, Pat Maddox wrote: > > > When I initially thought of doing this, I figured if I put the apps at > > different roots - /billing /support etc - then the links wouldn''t work > > at all, because they''d have the app root prefix. > > Please elaborate. Are you familiar with the RAILS_RELATIVE_URL_ROOT > environment variable? > > -- > -- Tom Mornini > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >Sure, if I''m in the billing application, which has a RAILS_RELATIVE_URL_ROOT of "billing", then all of the links I generate with the helpers will have that prefix. There''d be no way for me to link to http://mysite/support/faq from inside a billing page. Pat
On Jun 19, 2006, at 11:22 PM, Pat Maddox wrote:> On 6/20/06, Tom Mornini <tmornini@infomania.com> wrote: >> On Jun 19, 2006, at 9:39 PM, Pat Maddox wrote: >> >> > When I initially thought of doing this, I figured if I put the >> apps at >> > different roots - /billing /support etc - then the links >> wouldn''t work >> > at all, because they''d have the app root prefix. >> >> Please elaborate. Are you familiar with the RAILS_RELATIVE_URL_ROOT >> environment variable? > > Sure, if I''m in the billing application, which has a > RAILS_RELATIVE_URL_ROOT of "billing", then all of the links I generate > with the helpers will have that prefix. There''d be no way for me to > link to http://mysite/support/faq from inside a billing page.Ah, that sort of trouble. :-) That said, you don''t *have* to use the link generators. Rails apps can, indeed, link to non-rails apps written by developers not so fortunate was we. :-) -- -- Tom Mornini
On 6/20/06, Pat Maddox <pergesu@gmail.com> wrote:> On 6/20/06, Tom Mornini <tmornini@infomania.com> wrote: > > On Jun 19, 2006, at 9:39 PM, Pat Maddox wrote: > > > > > When I initially thought of doing this, I figured if I put the apps at > > > different roots - /billing /support etc - then the links wouldn''t work > > > at all, because they''d have the app root prefix.Correct me if I''m smoking something and not sharing...but I wouldn''t the absolute URLs possibly work. Especially if you were to utilize a hard-coded URL string in the routing: --- --- --- --- --- As with url_for( ), link_to( ) and friends also support absolute URLs. <%= link_to("Help" , "http://my.site/help/index.html" ) %> --- --- --- --- --- In theory, you should be able to exclude the "index.html" and create a route with /help/... and route straight to the default help action. Of course, yours would need to try using /support, etc... But I''m thinking it would work. And if not I''ll be crying heehee... This is the way I was planning on handling it in an upcoming app. If not I may have to break it out and utilize a single-sign on solution. :: grumble :: -Curtis
On 6/20/06, Tom Mornini <tmornini@infomania.com> wrote:> On Jun 19, 2006, at 11:22 PM, Pat Maddox wrote: > > > On 6/20/06, Tom Mornini <tmornini@infomania.com> wrote: > >> On Jun 19, 2006, at 9:39 PM, Pat Maddox wrote: > >> > >> > When I initially thought of doing this, I figured if I put the > >> apps at > >> > different roots - /billing /support etc - then the links > >> wouldn''t work > >> > at all, because they''d have the app root prefix. > >> > >> Please elaborate. Are you familiar with the RAILS_RELATIVE_URL_ROOT > >> environment variable? > > > > Sure, if I''m in the billing application, which has a > > RAILS_RELATIVE_URL_ROOT of "billing", then all of the links I generate > > with the helpers will have that prefix. There''d be no way for me to > > link to http://mysite/support/faq from inside a billing page. > > Ah, that sort of trouble. :-) > > That said, you don''t *have* to use the link generators. > > Rails apps can, indeed, link to non-rails apps written by developers > not so fortunate was we. :-) > > -- > -- Tom Mornini > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >Well these would all be Rails apps, which is why I''d prefer to use the generators. I suppose I could just hardcode the links in, but that feels ugly and un-railsy. Also, how do I go about sharing layouts among all the different apps? Do I have to resort to just copy and paste? Pat
If you''re running *nix, you could just create symbolic links for your layouts to each application: put the "real" file in one application, then sym link it to all your other apps. That would allow you to change your layout file in one place, and have the changes available to all your applications simultaneously. Much better than copy/paste, simple, easy to maintain, ... Regards Dave M. On 22/06/06, Pat Maddox <pergesu@gmail.com> wrote:> On 6/20/06, Tom Mornini <tmornini@infomania.com> wrote: > > On Jun 19, 2006, at 11:22 PM, Pat Maddox wrote: > > > > > On 6/20/06, Tom Mornini <tmornini@infomania.com> wrote: > > >> On Jun 19, 2006, at 9:39 PM, Pat Maddox wrote: > > >> > > >> > When I initially thought of doing this, I figured if I put the > > >> apps at > > >> > different roots - /billing /support etc - then the links > > >> wouldn''t work > > >> > at all, because they''d have the app root prefix. > > >> > > >> Please elaborate. Are you familiar with the RAILS_RELATIVE_URL_ROOT > > >> environment variable? > > > > > > Sure, if I''m in the billing application, which has a > > > RAILS_RELATIVE_URL_ROOT of "billing", then all of the links I generate > > > with the helpers will have that prefix. There''d be no way for me to > > > link to http://mysite/support/faq from inside a billing page. > > > > Ah, that sort of trouble. :-) > > > > That said, you don''t *have* to use the link generators. > > > > Rails apps can, indeed, link to non-rails apps written by developers > > not so fortunate was we. :-) > > > > -- > > -- Tom Mornini > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > Well these would all be Rails apps, which is why I''d prefer to use the > generators. I suppose I could just hardcode the links in, but that > feels ugly and un-railsy. > > Also, how do I go about sharing layouts among all the different apps? > Do I have to resort to just copy and paste? > > Pat > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
On 6/20/06, Curtis <cuspendlove@gmail.com> wrote:> On 6/20/06, Pat Maddox <pergesu@gmail.com> wrote: > > On 6/20/06, Tom Mornini <tmornini@infomania.com> wrote: > > > On Jun 19, 2006, at 9:39 PM, Pat Maddox wrote: > > > > > > > When I initially thought of doing this, I figured if I put the apps at > > > > different roots - /billing /support etc - then the links wouldn''t work > > > > at all, because they''d have the app root prefix. > > Correct me if I''m smoking something and not sharing...but I wouldn''t > the absolute URLs possibly work. Especially if you were to utilize a > hard-coded URL string in the routing: > > --- --- --- --- --- > As with url_for( ), link_to( ) and friends also support absolute URLs. > <%= link_to("Help" , "http://my.site/help/index.html" ) %> > --- --- --- --- --- > > In theory, you should be able to exclude the "index.html" and create a > route with /help/... and route straight to the default help action. > Of course, yours would need to try using /support, etc... But I''m > thinking it would work. And if not I''ll be crying heehee... This is > the way I was planning on handling it in an upcoming app. > > If not I may have to break it out and utilize a single-sign on > solution. :: grumble :: > > > -Curtis > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >Hey Curtis, check out this plugin I announced at http://www.ruby-forum.com/topic/70247. That will let you get around the prefixes that get set. Also, if it''s actually possible to share routes from plugins (it''s supposed to be, but people seem to be having problems...), then you could use this in conjunction with shared routes to achieve what you and I want. Pat
On 6/21/06, Tom Mornini <tmornini@mac.com> wrote:> On Jun 21, 2006, at 5:00 PM, Pat Maddox wrote: > > > On 6/20/06, Tom Mornini <tmornini@infomania.com> wrote: > >> On Jun 19, 2006, at 11:22 PM, Pat Maddox wrote: > >> > >> > On 6/20/06, Tom Mornini <tmornini@infomania.com> wrote: > >> >> On Jun 19, 2006, at 9:39 PM, Pat Maddox wrote: > >> >> > >> >> > When I initially thought of doing this, I figured if I put the > >> >> apps at > >> >> > different roots - /billing /support etc - then the links > >> >> wouldn''t work > >> >> > at all, because they''d have the app root prefix. > >> >> > >> >> Please elaborate. Are you familiar with the > >> RAILS_RELATIVE_URL_ROOT > >> >> environment variable? > >> > > >> > Sure, if I''m in the billing application, which has a > >> > RAILS_RELATIVE_URL_ROOT of "billing", then all of the links I > >> generate > >> > with the helpers will have that prefix. There''d be no way for > >> me to > >> > link to http://mysite/support/faq from inside a billing page. > >> > >> Ah, that sort of trouble. :-) > >> > >> That said, you don''t *have* to use the link generators. > >> > >> Rails apps can, indeed, link to non-rails apps written by developers > >> not so fortunate was we. :-) > >> > >> -- > >> -- Tom Mornini > >> > >> _______________________________________________ > >> Rails mailing list > >> Rails@lists.rubyonrails.org > >> http://lists.rubyonrails.org/mailman/listinfo/rails > >> > > > > Well these would all be Rails apps, which is why I''d prefer to use the > > generators. I suppose I could just hardcode the links in, but that > > feels ugly and un-railsy. > > > > Also, how do I go about sharing layouts among all the different apps? > > Do I have to resort to just copy and paste? > > Use Subversions svn:external property to share code between repos. > > -- > -- Tom Mornini > > > > -- > -- Tom Mornini > > >Doesn''t svn:external only work for directories, not individual files? I want to be able to share a layout file, that''s it.