aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/required_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Provide a better error message on :required associationHenrik Nygren2015-01-281-2/+22
| | | | Fixes #18696.
* tests, use `drop_table if_exists: true` in our test suite.Yves Senn2015-01-201-2/+2
|
* Replace drop sql statement to drop_table methodYasuo Honda2014-09-111-2/+2
| | | | to drop sequences at the same time each tables dropped for Oracle
* Remove 'if exists' from drop table statement then use `table_exists?`Yasuo Honda2014-09-031-2/+2
| | | | | Since 'drop table if exists' statement does not always work with some databases such as Oracle.
* Add a `required` option to singular associationsSean Griffin2014-07-041-0/+82
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.