I want to create a hidden field and create a link in one helper and then output both to my erb.
<%= my_cool_helper \"something\", form %>
So far the best I have come up with is:
def my_cool_helper(name, form) out = capture { link_to name, a_path } out << capture { form.hidden_field name.tableize, value => 'something' } end
Is there a better way?