Merge pull request #51452 from Shopify/update-inverse-of-nil
Suggest `inverse_of: nil` instead of `false`
This commit is contained in:
commit
f9c262be8e
@ -715,7 +715,7 @@ def automatic_inverse_of
|
||||
" is disabled.\n\n" \
|
||||
"If automatic inference is intended, you can consider enabling" \
|
||||
" `config.active_record.automatically_invert_plural_associations`.\n\n" \
|
||||
"If automatic inference is not intended, you can silence this warning by defining the association with `inverse_of: false`."
|
||||
"If automatic inference is not intended, you can silence this warning by defining the association with `inverse_of: nil`."
|
||||
)
|
||||
reflection = nil
|
||||
end
|
||||
|
@ -1090,7 +1090,7 @@ And on a per-association basis:
|
||||
class Comment < ApplicationRecord
|
||||
self.automatically_invert_plural_associations = true
|
||||
|
||||
belongs_to :post, inverse_of: false
|
||||
belongs_to :post, inverse_of: nil
|
||||
end
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user