From 2700b1316c896f148ed2ccbbfb4b2244d0f483c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Tue, 19 Apr 2011 15:23:24 -0300 Subject: [PATCH] Improve the documentation of input_field helper --- lib/simple_form/form_builder.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/simple_form/form_builder.rb b/lib/simple_form/form_builder.rb index a9fc5e43..95f11db2 100644 --- a/lib/simple_form/form_builder.rb +++ b/lib/simple_form/form_builder.rb @@ -91,7 +91,7 @@ module SimpleForm end alias :attribute :input - # Helper for outputting only the input tag, no wrapper, errors, label etc + # Creates a input tag for the given attribute. # # == Examples # @@ -99,6 +99,11 @@ module SimpleForm # f.input_field :name # end # + # This is the output html (only the input portion, not the form): + # + # + # def input_field(attribute_name, options={}) options.merge!({:components => [:input], :wrapper => false}) input(attribute_name, options)