lib/formtastic/helpers/fieldset_wrapper.rb in formtastic-3.1.4 vs lib/formtastic/helpers/fieldset_wrapper.rb in formtastic-3.1.5
- old
+ new
@@ -67,10 +67,10 @@
key = "#{parent[:builder].object_name}[#{child}_attributes]"
# TODO: One of the tests produces a scenario where duck is "0" and the test looks for a "1"
# in the legend, so if we have a number, return it with a +1 until we can verify this scenario.
- return duck + 1 if duck.is_a?(Fixnum)
+ return duck + 1 if duck.is_a?(Integer)
# First try to extract key from duck Hash, then try child
(duck[key] || duck[child]).to_i + 1
end