lib/formtastic/helpers/input_helper.rb in formtastic-4.0.0 vs lib/formtastic/helpers/input_helper.rb in formtastic-5.0.0
- old
+ new
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
+# frozen_string_literal: true
module Formtastic
module Helpers
# {#input} is used to render all content (labels, form widgets, error messages, hints, etc) for
# a single form input (or field), usually representing a single method or attribute on the
@@ -308,13 +309,10 @@
when @object.class.respond_to?(:type_for_attribute)
@object.class.type_for_attribute(method.to_s)
when @object.class.respond_to?(:column_for_attribute)
@object.class.column_for_attribute(method)
when @object.respond_to?(:column_for_attribute)
- # Remove deprecation wrapper & review after Rails 5.0 ships
- ActiveSupport::Deprecation.silence do
- @object.column_for_attribute(method)
- end
+ @object.column_for_attribute(method)
else nil
end
end
# Takes the `:as` option and attempts to return the corresponding input