D
Du De
I've got a website w/ lunarpages, and I've been using erb to do some
things w/ my pages. Everything has worked well so far.
My problem is, my main pages each call in header and footer templates,
but I can't figure out how to get the server to evaluate the templates
if they are .rhtml files w/ embedded ruby code.
I've tried:
----------------
<% require 'erb'
def import_erb path
ERB.new(File.read(path)).result()
# or ERB.new(File.read(path), nil, nil, '_x_').result()
end
%>
# and then
<%= import_erb('footer.rhtml') %>
things w/ my pages. Everything has worked well so far.
My problem is, my main pages each call in header and footer templates,
but I can't figure out how to get the server to evaluate the templates
if they are .rhtml files w/ embedded ruby code.
I've tried:
----------------
<% require 'erb'
def import_erb path
ERB.new(File.read(path)).result()
# or ERB.new(File.read(path), nil, nil, '_x_').result()
end
%>
# and then
<%= import_erb('footer.rhtml') %>