Last active
December 19, 2015 09:49
-
-
Save pyk/5936081 to your computer and use it in GitHub Desktop.
namespace doesn't use layout engine that set globally!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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