accepts-nested-attributes 问答列表

有没有一种建议的方法可以在 RoR 中创建嵌套的多对多实体,以避免嵌套资源的 JSON 字段中的 *_attributes?

作者:foamroll 提问时间:3/17/2022

我已经设法通过使用 for JSON 和下面的项目创建了嵌套的多对多实体。accepts_nested_attributes_for 我的问题是 - 有没有一种建议的方法可以实现同样的事情,我不必添...

accepts_nested_attributes_for和after_remove

作者:Betjamin Richards 提问时间:10/9/2023

我有一个这样的模型 class Post < ApplicationRecord has_many :comments, after_add: :soil, after_remove: :s...


共2条 当前第1页