Closed Tiikara closed 2 years ago
This method has changed in Rails from #record_changed? to #_record_changed? between 7.0.1 and 7.0.2.
Appears fixed with autosave_assocation.rb line 17 changed to:
if (autosave && record.changed_for_autosave?) || new_record? || _record_changed?(reflection, record, key)
Update: looks addressed in #570
For others who see this issue before the pr is merged, the below monkey-patch is a good temporary fix.
module ActiveRecord
module AutosaveAssociation
def record_changed?(reflection, record, key)
_record_changed?(reflection, record, key)
end
end
end
Fixed by #570.
Steps to reproduce
This error encountered on
model.update(attrs)
after update rails from 7.0.1 to 7.0.2. On 7.0.1 works perfectly.Expected behavior
Should successfull update
Actual behavior
System configuration
Rails version: 7.0.2
Ruby version: 3.1.0