Cirex/padrino-assets — pull request #6 by adamtrilling (2012-03-31 01:02:10+00:00)
Title: Stop HAML from generating a self-closing tag for javascript

When you call content_tag in HAML, it will generate a self-closing tag if the content parameter is nil. This is an issue for javascript with the src attribute, since those tags can't be self-closing. If you set the content to an empty string, it works fine in both HAML and ERB.

I added a test to make sure that javascript tags contain a separate element but it doesn't fail with the existing code unless the render is HAML, and I wasn't sure how to make the test render HAML without breaking other tests.