default layout doesn't work with nested templates
Reported by Jon Maddox | May 4th, 2008 @ 09:52 PM | in 0.3.0 Sammy
The default layout declared isn't shared with templates that are nested in directories.
get '/repositories/new' do
haml :new, :views_directory => 'views/repositories'
end
Comments and changes to this ticket
-
Ryan Tomayko May 5th, 2008 @ 01:54 AM
Interesting. I don't think I've ever used multiple directories under
viewsor this would have jumped out at me. Seems like we should support paths in the template name but the use of Symbol is going to make that a little weird.Out of curiosity, what happens you do something like this:
get '/repositories/new' do haml :'repositories/new' endThe syntax is valid but does it work as expected with layouts and everything?
-

chris (at christopher-schneider) May 26th, 2008 @ 09:17 AM
A quick bit of investigation indicates that the string as a symbol method that Ryan suggested works fine.
I have a directory structure like:
thingy.rb views/layout.erb views/thing/new.erb views/thing/layout.erbThe two layout files are different, so I can tell which one gets called.
The thingy.rb calls:
get '/' do erb :'thing/new' endThe two files that get used are:
views/layout.erb views/thing/new.erbSo in the end, it looks like nested views work ok, but it doesn't catch nested layouts. I'm not sure what the correct behavior with nested layouts would be though.
-
-

chris (at christopher-schneider) May 28th, 2008 @ 07:16 PM
What is the next step on this? I did some investigation, and I think we have a good idea of what the status is.
Is this really a bug, or is this closed, or maybe just a feature request?
-
Ryan Tomayko September 7th, 2008 @ 06:29 PM
- → Tag changed from to bug
- → Assigned user changed from Blake Mizerany to Ryan Tomayko
-
Ryan Tomayko September 7th, 2008 @ 06:31 PM
- → Tag cleared.
- → State changed from new to resolved
Let's call this one closed. Feel free to yell really loud and we'll reopen if this still effects you.
-

jazzmyn, November 30th, 2008 @ 10:38 PM
- no changes were found...
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
