Nathan's technique would of course work, but I'm always hesitant to put styling into my HTML much less my templates.
What about separating the concerns a little...
In the controller/RJS:
@visibility = hidden ? 'hidden' : visible
in the haml template:
div{:id => "my_id", :class => @visibility}
In the sass file:
.hidden
:display none
Or, let's say you have many of whatever this thing is....
@visibility["my_id"] = hidden ? 'hidden' : visible
and in the haml
div{:id => "my_id", :class => @visibility["my_id"]}
I could see an argument that this looks like more work, but it is a lot more flexible in the future. Think, for instance, what if you need a third state? Visible/Hidden/Highlighted? Putting a boolean all over your templates will require a lot of replacing. Assigning a variable in the controller logic can centralize the work.
Just a thought,
Jeff