RE: how to include an html file?

Other then that though you could simple open the file and
spit the results manually. So, a simple helper function:

def include_page(file_name)
result = “”
File.open(file_name, “r”) { |f| result << f.read }
result
end

That can be shortened to:

def include_page(file_name)
IO.read(file_name)
end

Regards,

Dan

Of course it can! :slight_smile:
Thanks for that, there seems to always be a ‘shorter’ way in ruby!

Thanx guys!

OR:

<%= render :file => ‘/absolute/full/path/to/file’ %>

And that will interpret any erb thats in the file as well.

Cheers-
-Ezra