rails/rails — pull request #16056 by sgrif (2014-07-04 20:54:06+00:00)
Title: Add a `required` option to singular associations

In addition to defining the association, a `required` association will
also have its presence validated.

Before:

```ruby
belongs_to :account
validates_presence_of :account
```

After:

```ruby
belongs_to :account, required: true
```

This helps to draw a distinction between types of validations, since
validations on associations are generally for data integrity purposes,
and aren't usually set through form inputs.