[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

How to include files with Ruby on Rails

idletask

6/10/2006 7:37:00 PM

Does anyone know the equivient of include('file.php'); or how to do an
SSI call with ruby on rails?
I can't seem to figure this out.

I use OSX, with Ruby on Rails using LightTPD. I tried making an SHMTL
file with an <!--#include file=""--> call in the SHTML file - but it
get's treated as an HTML comment.

Does Ruby have something like a PHP include() function?

I want to have my navigation menu's centralized.

I'm new to ruby, obviously :)

2 Answers

Nicolas Sanguinetti

6/10/2006 8:08:00 PM

0

idletask@msn.com wrote:
> Does anyone know the equivient of include('file.php'); or how to do an
> SSI call with ruby on rails?
> I can't seem to figure this out.
>
> I use OSX, with Ruby on Rails using LightTPD. I tried making an SHMTL
> file with an <!--#include file=""--> call in the SHTML file - but it
> get's treated as an HTML comment.
>
> Does Ruby have something like a PHP include() function?
>
> I want to have my navigation menu's centralized.
>
> I'm new to ruby, obviously :)

render :partial => 'shared/menu' could do, depending on how you are
doing things. Google up "rendering shared partials in ruby on rails" or
something like that.

HTH
-N

idletask

6/10/2006 9:02:00 PM

0

thanks alot. i will check into that.

IT


Nicolas Sanguinetti wrote:
> idletask@msn.com wrote:
> > Does anyone know the equivient of include('file.php'); or how to do an
> > SSI call with ruby on rails?
> > I can't seem to figure this out.
> >
> > I use OSX, with Ruby on Rails using LightTPD. I tried making an SHMTL
> > file with an <!--#include file=""--> call in the SHTML file - but it
> > get's treated as an HTML comment.
> >
> > Does Ruby have something like a PHP include() function?
> >
> > I want to have my navigation menu's centralized.
> >
> > I'm new to ruby, obviously :)
>
> render :partial => 'shared/menu' could do, depending on how you are
> doing things. Google up "rendering shared partials in ruby on rails" or
> something like that.
>
> HTH
> -N