title: Permitted param with multiple types
body: <p>permitted params is defined as follows</p>
  <pre><code>params.permit(
            feature_settings: %i[
              name
              enabled: %i[
                enabled
              ]
            ])
  </code></pre>
  <p><strong>enabled</strong> param in feature_settings can be <strong>boolean value or an object</strong></p>
  <p>The output for params is as follows</p>
  <pre><code>&quot;feature_settings&quot;=&gt;[{&quot;name&quot;=&gt;&quot;settings 1&quot;, &quot;enabled&quot;=&gt;{&quot;enabled&quot;=&gt;false}}, {&quot;name&quot;=&gt;&quot;settings 2&quot;, &quot;enabled&quot;=&gt;true}]
  </code></pre>
  <p>The output for permitted_params[:feature_settings] is as follows</p>
  <pre><code>    permitted_params[:feature_settings]
  =&gt; [&lt;ActionController::Parameters {&quot;name&quot;=&gt;&quot;settings 1&quot;} permitted: true&gt;,
   &lt;ActionController::Parameters {&quot;name&quot;=&gt;&quot;settings 2&quot;, &quot;enabled&quot;=&gt;true} permitted: true&gt;,
  </code></pre>
  <p>Settings 1 is not returning the <strong>enabled</strong> hash. Any idea on how to fix this?</p>