rails icon indicating copy to clipboard operation
rails copied to clipboard

Docs: ActiveRecord validations - Skipping Validations fails to mention callbacks/timestamps in some cases

Open Earlopain opened this issue 2 months ago • 2 comments

Steps to reproduce

https://guides.rubyonrails.org/active_record_validations.html#skipping-validations lists a bunch of methods that skip validations. One of these is update_columns, which in addition to skipping validations also skips callbacks and doesn't update timestamps. This is explained in the method doc at https://api.rubyonrails.org/classes/ActiveRecord/Persistence.html#method-i-update_columns but should also be mentioned there.

Other listed methods likely do something similar.

Expected behavior

Docs should mention what other consequences there are to using these methods apart from just skipping validations. Might be fine to just put this as a general note, urging the user to look up the docs for the method they are intersted in using. Maybe method docs can be linked to directly from the list instead of just using method name code blocks?

Earlopain avatar Feb 22 '24 16:02 Earlopain