Skip to content

Instantly share code, notes, and snippets.

@pyk
Last active December 19, 2015 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pyk/5936081 to your computer and use it in GitHub Desktop.
Save pyk/5936081 to your computer and use it in GitHub Desktop.
namespace doesn't use layout engine that set globally!
# configure block
configure do
set :views , "assets"
set :erb , :layout => :"views/layout"
enable :sessions
end
.
.
.
namespace "/login/?" do
get do
...
erb :"views/auth/login" # by default this erb file doesn't load the layout engine that set globally
end
post do
...
end
end
# after adding this code inside namespace is work
namespace "/login/?" do
get do
...
erb :"views/auth/login" , :layout => :"views/layout" # layout engine work perfectly!
end
post do
...
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment