From: Alvaro Bautista Date: 2008-02-13T08:48:15+09:00 Subject: ERB: import function I want to import rhtml files into another using ERB. I wrote a function: def import(fn) e = "" File.open(fn) do |f| e = ERB.new(f.read) end e.result end This function does what I want, reads the template file and processes it returning the result string. The problem is that if I do, for instance: Some content <%= import('some.rhtml') %> The result contains only the some.rhtml processed file and the content following the import line. -- Posted via http://www.ruby-forum.com/.