aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
Diffstat (limited to 'guides')
-rw-r--r--guides/source/association_basics.md7
1 files changed, 3 insertions, 4 deletions
diff --git a/guides/source/association_basics.md b/guides/source/association_basics.md
index fa522f2eaf..02d012d702 100644
--- a/guides/source/association_basics.md
+++ b/guides/source/association_basics.md
@@ -1057,8 +1057,7 @@ There may be times when you wish to customize the query used by `belongs_to`. Su
```ruby
class Book < ApplicationRecord
belongs_to :author, -> { where active: true },
- dependent: :destroy,
- inverse_of: :books
+ dependent: :destroy
end
```
@@ -1075,7 +1074,7 @@ The `where` method lets you specify the conditions that the associated object mu
```ruby
class Book < ApplicationRecord
- belongs_to :author, -> { where active: true }, inverse_of: :books
+ belongs_to :author, -> { where active: true }
end
```
@@ -1329,7 +1328,7 @@ There may be times when you wish to customize the query used by `has_one`. Such
```ruby
class Supplier < ApplicationRecord
- has_one :account, -> { where active: true }, inverse_of: :supplier
+ has_one :account, -> { where active: true }
end
```