Part 1:
I have a call to layout(:default){|path,wish| wish !~ /rss|atom|json/}
but requests to /foo/bar.json
seem to think wish
is html
and uses the layout anyway. How can I fix this?
Part 2:
I want to route /path/to/file.ext
so that it calls the method to
on the controller mapped to /path
and uses ext
when formulating the return. Is there a better (more elegant) way to do this than passing the 'file.ext' to the to
method, parsing it, and doing cases? This question would have been more succinct if I had written, how does one do REST with Ramaze? There appears to be a Google Groups answer to this one, but I can't access it for some reason.