-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
[ci skip] fix the collection.clear
guide
#20421
[ci skip] fix the collection.clear
guide
#20421
Conversation
# keys to <tt>NULL</tt>. For, +has_many+ <tt>:through</tt>, the default | ||
# strategy is +delete_all+. | ||
# Deletes the +records+ supplied from the collection according to the strategy | ||
# specified by the +:dependent+ option. If no +:dependent+ option is given, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it needs to use <tt>
for symbols
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
echo "+:dependent+" | rdoc --pipe
still outputs <p><code>:dependent</code></p>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For delete_all
too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, for +:delete_all+
using the same idea you get <p><code>:delete_all</code></p>
.
Improve the guide about `has_many` `collection.clear` to indicate the behavior for each dependent strategy according to `collection.delete_all`. Based on rails#17179, I changed the `collection.delete` docs to also clarify the default strategy for each `hm` and `hm:t` associations. Fixes rails#20170.
77b0241
to
efa1648
Compare
…pi-docs [ci skip] fix the `collection.clear` guide
…pi-docs [ci skip] fix the `collection.clear` guide
@rafaelfranca Thanks for reviewing! |
Improve the guide about
has_many
collection.clear
to indicate the behavior for each dependent strategy according tocollection.delete_all
.Based on #17179, I changed the
collection.delete
docs to also clarify the default strategy for eachhm
andhm:t
associations.Fixes #20170.