Ruby equivalence for php include("file.php");

Hi there

I'm doing some RoR exercices to begin a website and I want to include a
file which contains the header template. I have coded using php
before and I know it's done using include("file.php") and I don't know
how to do it.

How do you include a html template into another one (I haven't found
anything googling)?

Thanks in advance

Regards

···

--

Miquel (a.k.a. Ktalà a.k.a. Ton)
Linux User #286784
GPG Key : 4D91EF7F
Debian GNU/Linux (Linux wolverine 2.6.22.5)

Welcome to the jungle, we got fun and games
Guns n' Roses

Miquel Oliete wrote:

I'm doing some RoR exercices to begin a website and I want to include a
file which contains the header template. I have coded using php
before and I know it's done using include("file.php") and I don't know
how to do it.

This is the Ruby mailing list. The Ruby on Rails mailing list is what you want: http://groups.google.com/group/rubyonrails-talk

Any good (or even mediocre) RoR tutorial will tell you how to do this. Hint: 'render :partial'.

···

--
Avdi

Thanks for your hint and let me abuse of your kindness and knowledge
asking which are the differences between 'render :partial' and 'render:
file'

Thanks again :smiley:

Regards

···

On Sat, 8 Mar 2008 02:27:37 +0900 Avdi Grimm wrote:

This is the Ruby mailing list. The Ruby on Rails mailing list is what
you want: http://groups.google.com/group/rubyonrails-talk

Any good (or even mediocre) RoR tutorial will tell you how to do this.
Hint: 'render :partial'.

--

Miquel (a.k.a. Ktalà a.k.a. Ton)
Linux User #286784
GPG Key : 4D91EF7F
Debian GNU/Linux (Linux wolverine 2.6.22.5)

Welcome to the jungle, we got fun and games
Guns n' Roses

Thanks for your hint and let me abuse of your kindness and knowledge
asking which are the differences between 'render :partial' and 'render:
file'

···

--
Avdi

Thanks a lot Avdi, I was reading this page when I received your answer.

Regards

···

On Sat, 8 Mar 2008 03:10:01 +0900 Avdi Grimm wrote:

> Thanks for your hint and let me abuse of your kindness and knowledge
> asking which are the differences between 'render :partial' and 'render:
> file'

ActionController::Base

--
Avdi

--

Miquel (a.k.a. Ktalà a.k.a. Ton)
Linux User #286784
GPG Key : 4D91EF7F
Debian GNU/Linux (Linux wolverine 2.6.22.5)

Welcome to the jungle, we got fun and games
Guns n' Roses