私accepts_nested_attributesは自分のモデルの親で使用し、親モデルには子モデルとの属している関係があります。子モデル ( after_update、after_create) でコールバックを使用しようとしています。親レコードを更新するために、parent_controller で update_attributes を使用すると、コールバックafter_createは正常に機能しますがafter_update、トリガーされません。
class Parent
accepts_nested_attributes :children
belongs_to :children
end
class Children
before_save :saving
after_update :test
has_many :parents
end
この問題を解決するのを手伝ってください。