1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test
Sean Griffin 00f5551650 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.
2014-07-04 16:10:45 -06:00
..
active_record/connection_adapters Add a type object to Column constructor 2014-05-17 17:16:05 -06:00
assets
cases Add a required option to singular associations 2014-07-04 16:10:45 -06:00
fixtures fk: use random digest names 2014-06-26 22:03:49 +02:00
migrations activerecord: Initialize Migration with version from MigrationProxy. 2014-01-06 10:46:35 -05:00
models Move writing unknown column exception to null attribute 2014-06-26 09:43:35 -06:00
schema MySQL doesn't work with foreign keys 2014-06-27 17:36:43 -07:00
support fk: :primary_key option for non-standard pk's. 2014-06-26 22:03:48 +02:00
.gitignore
config.example.yml Remove code related to adapter which are no longer in repo 2014-05-16 18:17:25 +02:00
config.rb