surround helper alternative in Haml
Written January 21, 2008. Tagged Ruby, Ruby on Rails, Haml.
I've previously blogged a simple alternative to the Haml
Today I wanted to put a link in parentheses. There is a
surround helper, but that syntax isn't pretty.
This is what I do instead:
= "(%s)" % link_to_remote("x", item, :method => :delete)
"(%s)" % "foo"
in Ruby is short for
and will simply return