Is there a way to configure Rails to use layouts from an absolute path? I''d like to share one layout file between a ton of applications. The only thing close has been a symbolic link, which works but will not be acceptable in our environment. Even a way to use partials from an absolute path would suffice. Thanks in advance... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Not sure about the layout, but you can do: render :file => ''/path/to/a/file.html'', :layout => true You can omit the layout bit at the end if you just want to render the file without your layout. On Feb 7, 6:29 pm, David <dmhol...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Is there a way to configure Rails to use layouts from an absolute > path? I''d like to share one layout file between a ton of applications. > The only thing close has been a symbolic link, which works but will > not be acceptable in our environment. Even a way to use partials from > an absolute path would suffice. > > Thanks in advance...--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
It''s actually not that hard to symlink the app/views/layouts folder to like /rails/apps/shared_layouts I''ve done that before with success. Another alternative is to "share" them via SVN Externals... the layouts is its own project in svn, and each rails app references the layouts project. On Feb 7, 2008 7:01 PM, Reacher <brandon.g.jones-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Not sure about the layout, but you can do: > > render :file => ''/path/to/a/file.html'', :layout => true > > You can omit the layout bit at the end if you just want to render the > file without your layout. > > On Feb 7, 6:29 pm, David <dmhol...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Is there a way to configure Rails to use layouts from an absolute > > path? I''d like to share one layout file between a ton of applications. > > The only thing close has been a symbolic link, which works but will > > not be acceptable in our environment. Even a way to use partials from > > an absolute path would suffice. > > > > Thanks in advance... > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Well, the issue there would be we don''t want to call it all over the place. I need it to work more like application.erb, or at most be specified with layouts call. On Feb 7, 7:01 pm, Reacher <brandon.g.jo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Not sure about the layout, but you can do: > > render :file => ''/path/to/a/file.html'', :layout => true > > You can omit the layout bit at the end if you just want to render the > file without your layout. > > On Feb 7, 6:29 pm, David <dmhol...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Is there a way to configure Rails to uselayoutsfrom an absolute > > path? I''d like to share one layout file between a ton of applications. > > The only thing close has been a symbolic link, which works but will > > not be acceptable in our environment. Even a way to use partials from > > an absolute path would suffice. > > > Thanks in advance...--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
No, not hard at all. And it works great. But I won''t be able to do symlinks in our deployment environment. We are not deploying via SVN, so sharing there won''t work. The environment is fairly constrained to reuse what exists and is running via JRuby and Tomcat. On Feb 7, 9:41 pm, "Brian Hogan" <bpho...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> It''s actually not that hard to symlink the app/views/layouts folder to like > /rails/apps/shared_layouts > > I''ve done that before with success. Another alternative is to "share" them > via SVN Externals... the layouts is its own project in svn, and each rails > app references the layouts project. > > On Feb 7, 2008 7:01 PM, Reacher <brandon.g.jo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Not sure about the layout, but you can do: > > > render :file => ''/path/to/a/file.html'', :layout => true > > > You can omit the layout bit at the end if you just want to render the > > file without your layout. > > > On Feb 7, 6:29 pm, David <dmhol...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Is there a way to configure Rails to use layouts from an absolute > > > path? I''d like to share one layout file between a ton of applications. > > > The only thing close has been a symbolic link, which works but will > > > not be acceptable in our environment. Even a way to use partials from > > > an absolute path would suffice. > > > > Thanks in advance...--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---