1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

5 commits

Author SHA1 Message Date
Henrik Nygren
9a6c6c6f09 Provide a better error message on :required association
Fixes #18696.
2015-01-28 11:32:10 +02:00
Yves Senn
7675364fe0 tests, use drop_table if_exists: true in our test suite. 2015-01-20 13:30:12 +01:00
Yasuo Honda
cb8b416764 Replace drop sql statement to drop_table method
to drop sequences at the same time each tables dropped for Oracle
2014-09-11 03:47:44 +09:00
Yasuo Honda
252165ea46 Remove 'if exists' from drop table statement then use table_exists?
Since 'drop table if exists' statement does not always work with
some databases such as Oracle.
2014-09-03 04:43:53 +09:00
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