lib/formtastic/helpers/input_helper.rb in formtastic-2.2.1 vs lib/formtastic/helpers/input_helper.rb in formtastic-2.3.0.rc
- old
+ new
@@ -230,9 +230,10 @@
# last_name: "Smith"
#
# @todo Many many more examples. Some of the detail probably needs to be pushed out to the relevant methods too.
# @todo More i18n examples.
def input(method, options = {})
+ method = method.to_sym if method.is_a?(String)
options = options.dup # Allow options to be shared without being tainted by Formtastic
options[:as] ||= default_input_type(method, options)
klass = input_class(options[:as])