エントリーの編集

エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
Rails 5 supports bi-directional destroy dependency
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています

- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
Rails 5 supports bi-directional destroy dependency
In Rails 4.x, it is not possible to have destroy dependency on both sides of a bi-directional ass... In Rails 4.x, it is not possible to have destroy dependency on both sides of a bi-directional association between the two models as it would result in an infinite callback loop causing SystemStackError: stack level too deep. 1 2class User < ActiveRecord::Base 3 has_one :profile, dependent: :destroy 4end 5 6class Profile < ActiveRecord::Base 7 belongs_to :user, dependent: :destroy 8end 9 Copy 1 2>>