Notes posted by mechazoidal
RSS feed
1 thank
Capturing blocks after >2.2
After 2.2, you can omit the do …end block and simply use the &block variable directly:
concat(content_tag(:div, :class => "wrapped_content") do capture(&block) end, block.binding)
becomes simply:
concat(content_tag(:div, capture(&block), :class => "wrapped_content"))