Skip to content

Commit

Permalink
[ci skip] Increase info on validate presence for association
Browse files Browse the repository at this point in the history
  • Loading branch information
JuarezLustosa committed Jun 21, 2020
1 parent 36b44ca commit 44d4477
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions guides/source/active_record_validations.md
Expand Up @@ -534,6 +534,8 @@ end
In order to validate associated records whose presence is required, you must
specify the `:inverse_of` option for the association:

NOTE: If you want to ensure that the association it is both present and valid, you also need to use `validates_associated`.

```ruby
class Order < ApplicationRecord
has_many :line_items, inverse_of: :order
Expand Down

0 comments on commit 44d4477

Please sign in to comment.