How to include files with Ruby on Rails


I

idletask

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 :)
 
Ad

Advertisements

N

Nicolas Sanguinetti

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
 
Ad

Advertisements

I

idletask

thanks alot. i will check into that.

IT


Nicolas said:
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
 

Top