问题描述:

I'm making a modular application:

main.rb

require "sinatra/namespace"

require "haml"

Dir.glob("servers/*/server.rb").each do |server|

require_relative server

end

And I want to do inline templating:

servers/some/server.rb

namespace "/some/hello" do

get "/" do

haml :index

end

end

__END__

@@ index

!!!

%html

hello

But I get the:

No such file or directory - views/index.haml

It works if I move the template to main.rb but then it's kinda not modular anymore.

相关阅读:
Top