Comments (5)
Can you reproduce this bug on Rails 7.1? Rails 6.1 isn't supported anymore
from rails.
Well, since I have a hard time reproducing it, it would mean upgrading the platform, which will take some time.
But if I find an easy way to reproduce I'll try on the latest version.
from rails.
A little bit of update, I have trouble reproducing it on a small project, but I have been able te debug it a bit more.
When calling reload on an activeRecord model, I start to have different instances of AttributeSet, and only one of them is updated when using the setter. Therefore, the object changes
method returns empty, and the save doesn't send any update query, as it expects nothing has changed.
After calling a save, things are going back to normal (i.e the same AttributeSet on both places), and changes are tracked appropriately.
object.send(:mutations_from_database).instance_variable_get(:@attributes).to_s
#<ActiveModel::LazyAttributeSet:0x0000000111c8af70>
object.instance_variable_get(:@attributes).to_s
#<ActiveModel::LazyAttributeSet:0x00000001124caa00>
Given that there have been very little changes there between 6.1 and 7.1, I suspect the bug is still present.
How could I track more what happens during a reload on those objects?
from rails.
Search for def reload
. You will find methods like this
from rails.
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails team are limited, and so we are asking for your help.
If you can still reproduce this error on the 7-2-stable
branch or on main
, please reply with all of the information you have about it in order to keep the issue open.
Thank you for all your contributions.
from rails.
Related Issues (20)
- After Commit Callbacks Are Called When RELEASE SAVEPOINT HOT 3
- Downloading net-pop-0.1.2 HOT 3
- PG::SyntaxError on query serialize in Rails 7.2 HOT 13
- Association backed by ignored column can be accessed without error. HOT 4
- After touch callback does not run after destroy when using cache counter HOT 12
- ActiveJob::TestHelper#perform_enqueued_jobs no longer works in Rails 7.2 with default :async test adapter HOT 2
- Problem with cached_find_by and cached_find_by_statement HOT 1
- `BIND="::" rails s` fails HOT 6
- ActiveStorage `attach` errors in async context HOT 3
- Extend protect_from_forgery support to cross-domain frame embeds HOT 1
- Regression on `main` for `resources` with a hash
- Deprecate `config.active_job.enqueue_after_transaction_commit` config
- Enhanced I18n Interpolation with Piping HOT 3
- encrypts method must be called before using it on normalizes or attributes API HOT 11
- `require "active_support"` throws `cannot load such file -- active_support/core_ext/date_and_time/compatibility`
- `attributes_to_define_after_schema_loads` deprecation and recovery HOT 2
- Warnings for "Test is missing assertions" HOT 6
- It's not possible to override the `key_provider` or `key` using `ActiveRecord::Encryption.with_encryption_context` HOT 1
- Test names are missing after updating to 7.2 when running "rails test -v" HOT 4
- ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter equality is buggy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rails.