title: Rails 5 Devise not saving nested attributes
body: <p>I am trying to use <strong>configure_permitted_parameters</strong> for saving nested attributes at signup. What I did</p>
  
  <p>in routes </p>
  
  <pre><code>devise_for :students , controllers: { registrations: "registrations" }
  </code></pre>
  
  <p>Student Model:</p>
  
  <pre><code>class Student &lt; ApplicationRecord
    # Include default devise modules. Others available are:
    # :confirmable, :lockable, :timeoutable, :trackable and :omniauthable
    devise :database_authenticatable, :registerable,
           :recoverable, :rememberable, :validatable
  
    has_many :highlights
  
    accepts_nested_attributes_for :highlights #,:reject_if =&gt; proc { |a| a['name'].blank? }, allow_destroy: true
  end
  </code></pre>
  
  <p>Over ride registrations controller</p>
  
  <pre><code>class RegistrationsController &lt; Devise::RegistrationsController
    before_action :configure_permitted_parameters, :only =&gt; [:create]
  
    protected
  
      def configure_permitted_parameters
        devise_parameter_sanitizer.permit(:sign_up) { |u| u.permit(:email, :password, :first_name, :last_name ,:college_ids, highlights_attributes: [:id, :name, :_destroy], adjectives_attributes: [:id, :name, :_destroy]) }
      end
  end
  </code></pre>
  
  <p>In view</p>
  
  <pre><code>#highlights
    = f.simple_fields_for :highlights, (f.object.highlights.build unless f.object.highlights.present?) do |highlight|
      = render 'highlight_fields', f: highlight
    .example
      .col-xs-12
        = link_to_add_association f, :highlights, class:"btn btn-dark waves-effect waves-light" do
          i.icon.md-plus
          span.hidden-xs Add More Highlights
  </code></pre>
  
  <p>highlights partial</p>
  
  <pre><code>.highlight.nested-fields
    .example
      .col-md-11
        = f.input :name,required:true, wrapper: :base_input,input_html:{value: f.object.name }, label:'NAME', placeholder:'Name here'
  
      .col-sm-1
        h4.example-title &amp;nbsp;
        = link_to_remove_association  f, class:'btn  btn-icon btn-flat btn-default red-600' do
          i.icon.md-delete
  </code></pre>
  
  <p>Now when I try to save than params I receive are</p>
  
  <pre><code>&lt;ActionController::Parameters {"utf8"=&gt;"✓", "authenticity_token"=&gt;"z+ue8ewIcnZY3OUFQI8sKq4yNbmc0Zi8w5Jdiioov6A3tWRxS9+r8lyqbOahzo+9ftWS06JtKBYDDyXLtOwAEQ==", "student"=&gt;&lt;ActionController::Parameters {"first_name"=&gt;"Muhammad", "last_name"=&gt;"Iqbal", "email"=&gt;"m.faisal.pucit@gmail.com", "password"=&gt;"12345678", "password_confirmation"=&gt;"12345678", "highlights_attributes"=&gt;{"0"=&gt;{"name"=&gt;"ada", "_destroy"=&gt;"false"}}, "adjectives_attributes"=&gt;{"0"=&gt;{"name"=&gt;"asdasd", "_destroy"=&gt;"false"}}} permitted: false&gt;, "controller"=&gt;"registrations", "action"=&gt;"create"} permitted: false&gt;
  </code></pre>
  
  <p>But it's only saving first_name and last_name for student but not highlights.</p>
  
  <p>What have I missed?</p>
  
  <p>Call logs:</p>
  
  <pre><code>Processing by RegistrationsController#create as HTML
    Parameters: {"utf8"=&gt;"✓", "authenticity_token"=&gt;"z+ue8ewIcnZY3OUFQI8sKq4yNbmc0Zi8w5Jdiioov6A3tWRxS9+r8lyqbOahzo+9ftWS06JtKBYDDyXLtOwAEQ==", "student"=&gt;{"first_name"=&gt;"Muhammad", "last_name"=&gt;"Iqbal", "email"=&gt;"test@example.com", "password"=&gt;"[FILTERED]", "password_confirmation"=&gt;"[FILTERED]", "highlights_attributes"=&gt;{"0"=&gt;{"name"=&gt;"ada", "_destroy"=&gt;"false"}}, "adjectives_attributes"=&gt;{"0"=&gt;{"name"=&gt;"asdasd", "_destroy"=&gt;"false"}}}}
  </code></pre>