Skip to content

Commit

Permalink
Encourage the user to check method docs in AR Callback/Validation Guides
Browse files Browse the repository at this point in the history
  • Loading branch information
Earlopain committed Mar 5, 2024
1 parent 17662a4 commit d3f16a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion guides/source/active_record_callbacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ Just as with validations, it is also possible to skip callbacks by using the fol
* [`upsert`][]
* [`upsert_all`][]

These methods should be used with caution, however, because important business rules and application logic may be kept in callbacks. Bypassing them without understanding the potential implications may lead to invalid data.
These methods should be used with caution, however, because important business rules and application logic may be kept in callbacks. Bypassing them without understanding the potential implications may lead to invalid data. Refer to the method documentation to learn more.

[`decrement!`]: https://api.rubyonrails.org/classes/ActiveRecord/Persistence.html#method-i-decrement-21
[`decrement_counter`]: https://api.rubyonrails.org/classes/ActiveRecord/CounterCache/ClassMethods.html#method-i-decrement_counter
Expand Down
1 change: 1 addition & 0 deletions guides/source/active_record_validations.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ The non-bang versions don't: `save` and `update` return `false`, and

The following methods skip validations, and will save the object to the
database regardless of its validity. They should be used with caution.
Refer to the method documentation to learn more.

* [`decrement!`][]
* [`decrement_counter`][]
Expand Down

0 comments on commit d3f16a7

Please sign in to comment.