Ok, I tracked all my frustrations with haml helpers down to an
incompatibility in content_tag between Rails 2.2 and Haml 2.0.5
When I try rendering this call in my haml view, nothing shows up:
- content_tag :div do
SHOW ME SOME CONTENT
I tried this both on Haml 2.0.4 and the latest Haml Edge (0a14c3) both
install via plugins. In all cases the content doesnt display.
Here is a test project that demonstrates the problem. Use it with Haml
2.0.4 and Rails 2.2 and you'll see the content doesnt display in Haml.
On Rails 2.1 however, it will work fine.
http://s3.amazonaws.com/railsjedi/hamlbug_rails22.zip
Traced the problem down to the content_tag alias method chaining in
lib/haml/helpers/action_view_mods.rb
I've added a unit test that isolates the bug as well as a fix for the
issue in Rails 2.2. If you are running into this error when using Haml
with Rails 2.2, give it a try. It should resolve your problems.
http://github.com/jcnetdev/haml/commit/bc27e25fcafedb85ce37d818d2872118ad19ba9a
Hope this helps. Be great to get a patch for this into 2.0.5 soon
before more Rails 2.2 users run into this issue.