search for: box_caption

Displaying 1 result from an estimated 1 matches for "box_caption".

2005 Jun 29
2
Complex helper with block help
Hi everyone, I am writing a helper function that takes a parameter and block and wraps some HTML around it. e.g. def box_with_caption(caption, &block) data = capture(&block) buffer = render_partial("helpers/box_caption", :caption => caption) buffer << render_partial("helpers/box_data", :data => data) buffer end however, when I attempt the following, it doesn''t work. <%= box_with_caption("Caption here") do %> HTML for the box in here. <% end %> To make...