HAML prevents template engines to render anything else than HTML
Gosh, it took me about two days to find out that the issue that is causing this problem ismy layouts/application file which was named aplication.haml
.
Now when I wanted to use a template engine like Builder for xml or Rabl for json, it tried to render the template within the yield field in the layouts/application.haml
file and thus returning html as JSON
I found out that the problem lies within the application.haml
file
naming it application.html.haml solved the problem...