HAML prevents template engines to render anything else than HTML
问题 I am using Jbuilder (and I also tried to use Rabl) to render json. When I try to render the jbuilder template in my application it renders the template within the layouts/application file and returns HTML as JSON (see line 'within layouts/application'): Rides controller on Github Started GET "/random_photo.json" Processing by RidesController#random_photo as JSON >> Rendered rides/random_photo.json.jbuilder within layouts/application (0.3ms) Rendered shared/_banners_in_corners.haml (3.0ms)