Permalink
Browse files

Only render input component even with custom components

  • Loading branch information...
1 parent 510bce9 commit 7c2fbe14c858785ae951361757bea2a8d428d85b @rafaelfranca rafaelfranca committed Sep 23, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/simple_form/form_builder.rb
View
7 lib/simple_form/form_builder.rb
@@ -112,9 +112,12 @@ def input(attribute_name, options={}, &block)
# name="user[name]" size="100" type="text" value="Carlos" />
#
def input_field(attribute_name, options={})
+ column = find_attribute_column(attribute_name)
+ input_type = default_input_type(attribute_name, column, options)
+
options[:input_html] = options.except(:as, :collection, :label_method, :value_method)
- options.merge!(:label => false, :hint => false, :error => false, :wrapper => false)
- input(attribute_name, options)
+
+ find_mapping(input_type).new(self, attribute_name, column, input_type, options).input
end
# Helper for dealing with association selects/radios, generating the

0 comments on commit 7c2fbe1

Please sign in to comment.