title: Permit custom created params in rails
body: <p>I have already gone through following posts, without getting any satisfactory answers:</p>
  
  <p><a href="https://stackoverflow.com/questions/18055466/cant-permit-custom-params-with-strong-parameters">can&#39;t permit custom params with strong parameters</a></p>
  
  <p><a href="https://stackoverflow.com/questions/31297655/permit-extra-params-in-special-cases-with-strong-params-in-rails-4">Permit extra params in special cases with Strong Params in Rails 4</a></p>
  
  <p>What I want is to permit my custom created params in rails controller:</p>
  
  <p><strong>MY CODE</strong></p>
  
  <p><strong>Template</strong></p>
  
  <pre><code>= form_tag ...
    = select_tag :hour, options_for_select(options_for_hours), name: "clinic_hour[close_time][]", title: "Hours"
    = select_tag :minute, options_for_select(options_for_minutes), name: "clinic_hour[close_time][]", title: "Minutes"
    = select_tag :convention, options_for_select([["AM", "AM"], ["PM", "PM"]]), name: "clinic_hour[close_time][]"
    = submit_tag ...
  </code></pre>
  
  <p>The above code creates <strong>params</strong> like:</p>
  
  <pre><code>Parameters: {"clinic_hour"=&gt;{"close_time"=&gt;["0", "0", "AM"]}}
  </code></pre>
  
  <p>But in controller...</p>
  
  <p><strong>Controller</strong></p>
  
  <p>When I do like:</p>
  
  <pre><code>def clinic_hour_params
    params.require(:clinic_hour).permit(
      :close_time
    )
  end
  </code></pre>
  
  <p>It still says this, in rails server log:</p>
  
  <pre><code>Unpermitted parameters: close_time
  {}
  </code></pre>
  
  <p>What's wrong?</p>