在创建过程中使用范围集合属性,导致错误、可能删除数据和可能损坏数据

作者: michaelbaldry-il创建于 2026年3月11日更新于 2026年3月11日

Firstly, I want to say thanks for Active Admin, it's a great gift to the rails community ❤️ I recently dealt with a bug that caused creates to fail and could result in records being deleted that were unrelated to the action being performed in Active Admin. Using the Pundit authorization adapter with a scope class similar to the example one that is referenced in the documentation. The scope looks like this:

内容来源: activeadmin/activeadmin