diff --git a/actionpack/lib/action_controller/metal/strong_parameters.rb b/actionpack/lib/action_controller/metal/strong_parameters.rb
index <HASH>..<HASH> 100644
--- a/actionpack/lib/action_controller/metal/strong_parameters.rb
+++ b/actionpack/lib/action_controller/metal/strong_parameters.rb
@@ -540,6 +540,10 @@ module ActionController
         @permitted = new_permitted
       end
 
+      def fields_for_style?
+        @parameters.all? { |k, v| k =~ /\A-?\d+\z/ && v.is_a?(Hash) }
+      end
+
     private
       def new_instance_with_inherited_permitted_status(hash)
         self.class.new(hash).tap do |new_instance|
@@ -570,7 +574,7 @@ module ActionController
         when Array
           object.grep(Parameters).map { |el| yield el }.compact
         when Parameters
-          if fields_for_style?(object)
+          if object.fields_for_style?
             hash = object.class.new
             object.each { |k,v| hash[k] = yield v }
             hash
@@ -580,10 +584,6 @@ module ActionController
         end
       end
 
-      def fields_for_style?(object)
-        object.to_unsafe_h.all? { |k, v| k =~ /\A-?\d+\z/ && v.is_a?(Hash) }
-      end
-
       def unpermitted_parameters!(params)
         unpermitted_keys = unpermitted_keys(params)
         if unpermitted_keys.any?
push fields_for_style? in to a protected method

this way we don't need to call `to_unsafe_h` to get access to ask
questions about the underlying hash