Не удалось найти <Model> с ID = 14 для свойства с ID = 1

при обновлении я получил такую ошибку.

не мог»Найти PropertyAcceptanceCriterion с идентификатором = 14 для свойства с идентификатором = 1

эта ошибка возникает при снятии флажка и обновлении (сохранении).

Что я должен делать дальше,

определение модели
class PropertyAcceptance < ActiveRecord::Base
  belongs_to :property
  belongs_to :property_acceptance_criterion
end

class PropertyAcceptanceCriterion < ActiveRecord::Base
  attr_accessible :name
  has_many :property_acceptances, dependent: :destroy
  has_many :properties, through: :property_acceptances
end

class Property < ActiveRecord::Base
  attr_accessible :rent
  attr_accessible :room_no
  attr_accessible :property_acceptance_criterions_attributes
  attr_accessible :property_acceptance_criterion_ids
  has_many :property_acceptances, dependent: :destroy
  has_many :property_acceptance_criterions, through: :property_acceptances
  accepts_nested_attributes_for :property_acceptance_criterions, reject_if: lambda { |a| a[:name].blank? }
end
определение вида
= simple_nested_form_for @property do |f|
  = f.input :room_no, input_html: {class: 'span2'}
  = f.input :rent, input_html: {class: 'span2'}
  = f.association :property_acceptance_criterions, as: :check_boxes
  = f.simple_fields_for :property_acceptance_criterions do |c|
    = c.input :name, label: "add for #{t('activerecord.attributes.property.property_acceptance_criterions')}" if c.object.new_record?
определение контроллера
class Insurance::PropertiesController < Insurance::InsuranceController
  before_filter :load_property, only: [:edit, :update]
  before_filter :new_property, only: [:new, :create]
  def new
    @property.property_acceptance_criterions.build
  end
  def create
    @property.attributes = params[:property]
    if @property.save
      redirect_to @property, success: t('activerecord.flash.property.actions.create.success')
    else
      render :new
    end
  end
  def edit
    @property.property_acceptance_criterions.build
  end
  def update
    if @property.update_attributes(params[:property]) # ← error occur
      redirect_to @property, success: t('activerecord.flash.property.actions.update.success')
    else
      render :edit
    end
  end
  private
  def load_property
    @property = Property.find(params[:id])
  end
  def new_property
    @property = Property.new
  end
end
ошибка
Couldn't find PropertyAcceptanceCriterion with ID=14 for Property with ID=1
params это
{"utf8"=>"✓",
  "_method"=>"put",
  "authenticity_token"=>"+Zx7l7mAbX12PSO873x5NDxNOIeEe6bEDEdVnys+a98=",
  "property"=>{
  "room_no"=>"000",
  "rent"=>"80000",
  "property_acceptance_criterion_ids"=>["13", "25", ""],
  "property_acceptance_criterions_attributes"=>{
    "0"=>{"id"=>"13"}, "1"=>{"id"=>"14"}, "2"=>{"id"=>"25"}, "3"=>{"name"=>""}
  },
  "commit"=>"update",
  "id"=>"1"}

Ответы на вопрос(0)

Ваш ответ на вопрос