Elaborate using `inverse_of` with presence validation

This commit is contained in:
Jay Hayes 2012-12-13 14:04:21 -06:00
parent d5badea28c
commit 948c1e506c
1 changed files with 2 additions and 1 deletions

View File

@ -513,7 +513,8 @@ class LineItem < ActiveRecord::Base
end
```
You should also be sure to have a proper `:inverse_of` as well:
In order to validate associated records whose presence is required, you must
specify the `:inverse_of` the association:
```ruby
class Order < ActiveRecord::Base