From fb6e7798207fb9dfc8231a3d63e0affa068cf0a0 Mon Sep 17 00:00:00 2001 From: Lewis Wrigley Date: Tue, 5 Apr 2016 16:30:05 +0100 Subject: [PATCH] Add docs for #input method with block To explain what happens when you pass a block to the #input method within the form builder --- lib/simple_form/form_builder.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/simple_form/form_builder.rb b/lib/simple_form/form_builder.rb index 43fc8912..2021842e 100644 --- a/lib/simple_form/form_builder.rb +++ b/lib/simple_form/form_builder.rb @@ -48,6 +48,11 @@ module SimpleForm # label + input + hint (when defined) + errors (when exists), and all can # be configured inside a wrapper html. # + # If a block is given, the contents of the block will replace the input + # field that would otherwise be generated automatically. The content will + # be given a label and wrapper div to make it consistent with the other + # elements in the form. + # # == Examples # # # Imagine @user has error "can't be blank" on name