-
Notifications
You must be signed in to change notification settings - Fork 21.8k
AR not save updated PostgreSQL arrays #14763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
#not work
model.update! array: model.array.push(element)
#works
model.array << element
model.array_will_change!
model.save! |
@nleo this is currently expected behavior. Rails does not know when you change the object itself. You need to use the attribute writer |
It's also the same as with #6127 |
@senny I agree it maybe overwork to watch array changes, just notice that as user then I say to system |
The text was updated successfully, but these errors were encountered: