title: Rails 4 unpermitted params error
body: <p>I am receiving this error when a form submits:</p>
  
  <pre><code>Unpermitted parameters: postal_address_type_faos
  </code></pre>
  
  <p>I can confirm that the params come in ok but it looks like the postal_address_type_faos is being removed.</p>
  
  <p>This is the params whitelist:</p>
  
  <pre><code>    def paper_params
      params.require(:paper).permit(:status, :signature_id, :name, :code, 
           :create_user_id, :update_user_id, :created_at, :updated_at, 
          phone_numbers_attributes: [:id, :phone_type_id,  :area_code, :number, :extension, :create_user_id, :update_user_id, :created_at, :updated_at, :_destroy],
          postal_addresses_attributes: [:id, :postal_address_type_id, :country_id, :line_1,:line_2, :line_3, :city, :territory_id, :postal_zip_code,
           :address_note, :latitude, :longitude,
           :_destroy, :address_verification_status_id, :comment,
   postal_address_type_faos_attributes: [:id, :postal_address_id, :postal_address_type_id, :fao, :create_user_id, :update_user_id, :created_at, :updated_at, :_destroy]])
          end
  </code></pre>
  
  <p>Models:</p>
  
  <pre><code>class Paper &lt; ActiveRecord::Base
    has_many :paper_postal_addresses
    has_many :postal_addresses, through: :paper_postal_addresses
    has_many :postal_address_type_faos, through: :postal_addresses
  
    accepts_nested_attributes_for :postal_addresses
    accepts_nested_attributes_for :postal_address_type_faos
  
    has_many :phone_number_papers
    has_many :phone_numbers, through: :phone_number_papers
  
    accepts_nested_attributes_for :phone_numbers, allow_destroy: true
  
  class PaperPostalAddress &lt; ActiveRecord::Base
    belongs_to :paper
    belongs_to :postal_address
    has_many :postal_address_type_faos, through: :postal_address
  
  class PostalAddress &lt; ActiveRecord::Base
    has_many :postal_address_type_faos
    has_many :postal_address_types, :through =&gt; :postal_address_type_faos
  
    has_many :paper_postal_addresses
    has_many :papers, through: :paper_postal_addresses
  
  
  class PostalAddressTypeFao &lt; ActiveRecord::Base
    belongs_to :postal_address_type
    belongs_to :postal_address
    has_many :paper_postal_addresses, through: :postal_address
  
  class PostalAddressType &lt; ActiveRecord::Base
    has_many :postal_address_type_faos
    has_many :postal_addresses, through: :postal_address_type_faos
  </code></pre>
  
  <p>View code from the address partial is something like this</p>
  
  <pre><code>&lt;%= f.fields_for :postal_addresses do |address|%&gt;
          //some address stuff here
  
          //then do address fao type stuff (index is populated but not shown here)
  &lt;%= f.fields_for :postal_address_type_faos, @paper.postal_addresses[address.index].postal_address_type_faos[index] do |fa| %&gt;
            &lt;%= fa.check_box :postal_address_type_id, label: fa.object.postal_address_type.name %&gt;
             &lt;%= fa.text_field :fao, label: fa.object.fao %&gt;
       &lt;% end %&gt;
  
      &lt;% end %&gt;
  </code></pre>
  
  <p>Params coming back as:</p>
  
  <pre><code>    {"utf8"=&gt;"âœ“", "authenticity_token"=&gt;"R8ukkukuykuk", 
      "paper"=&gt;{"carrier_id"=&gt;"",  "name"=&gt;"",  "status"=&gt;"Active","digital_id"=&gt;"1","signature_id"=&gt;"1", "phone_numbers_attributes"=&gt;{"0"=&gt;{"create_user_id"=&gt;"1568", "phone_type_id"=&gt;"2", "country_phone_code_id"=&gt;"2", "area_code"=&gt;"", 
  "number"=&gt;"", "extension"=&gt;""}}, "postal_addresses_attributes"=&gt;{"0"=&gt;{"country_id"=&gt;"", "line_1"=&gt;"", "line_2"=&gt;"", "line_3"=&gt;"", "city"=&gt;"", "territory_id"=&gt;"", "postal_zip_code"=&gt;"", "subterritory"=&gt;"", "comment"=&gt;""},
   "1"=&gt;{"country_id"=&gt;"", "line_1"=&gt;"", "line_2"=&gt;"", "line_3"=&gt;"", "city"=&gt;"", "territory_id"=&gt;"", "postal_zip_code"=&gt;"", "subterritory"=&gt;"", "comment"=&gt;""},
   "2"=&gt;{"country_id"=&gt;"", "line_1"=&gt;"", "line_2"=&gt;"", "line_3"=&gt;"", "city"=&gt;"", "territory_id"=&gt;"", "postal_zip_code"=&gt;"", "subterritory"=&gt;"", "comment"=&gt;""}},
   "postal_address_type_faos_attributes"=&gt;{"0"=&gt;{"postal_address_type_id"=&gt;"1", "attention"=&gt;""}, "1"=&gt;{"postal_address_type_id"=&gt;"0", "fao"=&gt;""}, "2"=&gt;{"postal_address_type_id"=&gt;"0", "fao"=&gt;""}, "3"=&gt;{"postal_address_type_id"=&gt;"0",
   "fao"=&gt;""}, "4"=&gt;{"postal_address_type_id"=&gt;"0", "fao"=&gt;""}}}, "area_code_required"=&gt;"", "formaction"=&gt;"add_address", "action"=&gt;"create", 
  "controller"=&gt;"papers"}
  </code></pre>