[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: how to include files in ruby webs?

Gavin Kistner

9/8/2006 4:31:00 AM

From: Edward [mailto:edward@tanguay.info]
> What is the equivalent of
> include("library.php");
> in ruby?

In an ERB template, you can do <%=IO.read( 'header.inc' )%> to pull in the contents of another file.

As the other post mentioned, load and require allow you to load in ruby code from another ruby file.