Displaying 1 result from an estimated 1 matches for "myformbuilder".
Did you mean:
formbuilder
2011 Sep 13
3
Accessing Rails helper method with_output_buffer
...method (located in ActionView::Helpers::CaptureHelper) inside a custom
FormBuilder.
Below follows a simplified example.
I''m trying to achieve the following behavior in an ERB as suggested in
the form_for helper docs in the Rails source:
==========
<%= form_for @object, :builder => MyFormBuilder do |my_form| %>
<%= my_form.my_dummy_div_wrapper do %>
<%= ... %>
<%= end %>
<% end %>
==========
Here''s the helper:
==========
module MyHelper
class MyFormBuilder < ActionView::Helpers::FormBuilder
def my_dummy_div_wrapper(&block)
ou...