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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top