Open kotsiuruba opened 1 year ago
@kotsiuruba did you ever come right with this issue?
We're having a similar issue after upgrading the rails admin gem from 2.2.1
to 3.1.2
that - when editing a record, all the has_one
associations get cleared.
Specifically looks like behaviour changes in the gem upgrade from 2.2.1
to 3.0.0.beta
@kotsiuruba did you ever come right with this issue? We're having a similar issue after upgrading the rails admin gem from
2.2.1
to3.1.2
that when editing all thehas_one
associations get cleared.
@rebeccacrompton unfortunately no. To prevent deletions we made that field "read only":
field :notification do
read_only true
end
Our product is encountering the same update issue, causing us to revert to version 2.2.1. However, we are also trying to upgrade to Rails 7, and version 2.2.1 isn't compatible with it. Consequently, we are stuck on Rails 6 until this issue is resolved or we move to ActiveAdmin or a similar alternative.
Describe the bug I have two models:
and
rails_admin.rb
configuration for the Level modelGemfile
configurationUI works pretty well and allows me to create a notification from the Edit Level page
But when I submit the edit level form assigned notification is going to be deleted from the DB
Expected behavior
has_one
association should be still assigned to the edited recordAdd any other context about the problem here. When I tried to change association from
has_one :notification
tohas_many :notifications
with the same configuration editing works as expected.