I just upgraded to Rails3, Ruby 1.9.2 and the latest HAML gem. This code used to work:
= allowed? do
= link_to('New', new_video_path)
Now allowed?
yields 0
.
It works if I do:
= allowed?{ link_to('New', new_video_path) }
What gives?
do
to my helper method, thenyield
gives me1
(Fixnum) instead of the string, and the string is rendered separately before the helper method. However, it works fine with block passed using{}
.