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/cases
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
..
adapters Fix typo 2014-07-04 14:22:00 -03:00
associations Add a required option to singular associations 2014-07-04 16:10:45 -06:00
attribute_methods Promote time zone aware attributes to a first class type decorator 2014-06-16 15:09:39 -06:00
coders
connection_adapters Deprecate automatic counter caches on has_many :through 2014-06-26 07:24:34 -06:00
connection_specification
fixture_set
migration do not hold on to a stale connection object. fixes #15998 2014-07-01 17:59:43 -07:00
relation Remove duplicated parameter check on #where! 2014-05-23 23:53:00 +03:00
scoping Revert "Merge pull request #14544 from jefflai2/named_scope_sti" 2014-05-21 12:15:57 -03:00
tasks add bin/rake db:purge task to empty the current database. 2014-06-17 09:20:58 +02:00
type Detect in-place modifications on Strings 2014-06-17 20:09:27 -06:00
validations
adapter_test.rb Remove dead test code for unsupported adapters 2014-05-17 13:24:25 -06:00
aggregations_test.rb
ar_schema_test.rb ActiveRecord::SchemaMigration has no primary key. 2014-06-06 15:53:33 +02:00
associations_test.rb
attribute_decorators_test.rb Don't type cast the default on the column 2014-06-17 16:02:53 -06:00
attribute_methods_test.rb Move writing unknown column exception to null attribute 2014-06-26 09:43:35 -06:00
attribute_set_test.rb Attribute should know about its name 2014-06-26 07:18:21 -06:00
attribute_test.rb Attribute should know about its name 2014-06-26 07:18:21 -06:00
attributes_test.rb Rename property to attribute 2014-06-07 07:20:25 -06:00
autosave_association_test.rb Revert "Revert "Merge pull request #8313 from alan/only_save_changed_has_one_objects"" 2014-05-20 20:42:46 -03:00
base_test.rb Merge pull request #15593 from sgrif/sg-attribute 2014-06-13 15:45:49 -03:00
batches_test.rb
binary_test.rb /mysql/i -> MySQL, Spell correct in continuation to #15555 2014-06-14 17:11:08 +05:30
bind_parameter_test.rb Remove Column#primary 2014-05-23 11:09:48 -07:00
calculations_test.rb Don't use Column for type casting in Relation calculations 2014-06-18 05:52:12 -06:00
callbacks_test.rb
clone_test.rb
column_alias_test.rb
column_definition_test.rb Remove unused Column#coder 2014-05-28 07:48:07 -07:00
connection_management_test.rb
connection_pool_test.rb
core_test.rb implement ActiveRecord::Base#pretty_print + changelog 2014-05-29 08:06:03 -04:00
counter_cache_test.rb Add :all argument to count in reset_counters 2014-07-02 20:21:36 -05:00
custom_locking_test.rb
database_statements_test.rb
date_time_test.rb
defaults_test.rb Don't type cast the default on the column 2014-06-17 16:02:53 -06:00
dirty_test.rb Detect in-place modifications on Strings 2014-06-17 20:09:27 -06:00
disconnected_test.rb
dup_test.rb Don't error when duping a record with no PK 2014-07-02 07:00:26 -06:00
enum_test.rb
explain_subscriber_test.rb
explain_test.rb
finder_respond_to_test.rb
finder_test.rb Deprecate automatic counter caches on has_many :through 2014-06-26 07:24:34 -06:00
fixtures_test.rb remove deprecation call while initializing ClassCache object 2014-06-11 00:08:19 +05:30
forbidden_attributes_protection_test.rb
habtm_destroy_order_test.rb
helper.rb Deprecate decimal columns being automatically treated as integers 2014-05-27 05:42:45 -07:00
hot_compatibility_test.rb
i18n_test.rb
inheritance_test.rb Remove dead test code for unsupported adapters 2014-05-17 13:24:25 -06:00
integration_test.rb
invalid_connection_test.rb
invalid_date_test.rb
invertible_migration_test.rb
json_serialization_test.rb
locking_test.rb Don't mess with column_defaults when optimistic locking is enabled 2014-06-17 09:41:06 -06:00
log_subscriber_test.rb
migration_test.rb Don't type cast the default on the column 2014-06-17 16:02:53 -06:00
migrator_test.rb
mixin_test.rb
modules_test.rb Add support for module-level table_suffix in models 2014-05-05 12:41:26 -07:00
multiparameter_attributes_test.rb Remove dead test code for unsupported adapters 2014-05-17 13:24:25 -06:00
multiple_db_test.rb
nested_attributes_test.rb
nested_attributes_with_callbacks_test.rb
persistence_test.rb After find-via-reload, the record is not new 2014-07-05 00:21:24 +09:30
pooled_connections_test.rb Remove dead test code for unsupported adapters 2014-05-17 13:24:25 -06:00
primary_keys_test.rb Move writing unknown column exception to null attribute 2014-06-26 09:43:35 -06:00
query_cache_test.rb
quoting_test.rb Always pass a column with a type object to quote 2014-06-28 14:50:30 -06:00
readonly_test.rb
reaper_test.rb
reflection_test.rb Add regression tests for keys on nested associations 2014-07-01 14:00:05 -04:00
relation_test.rb Consolidate testing of update_all type casting 2014-06-26 07:57:03 -06:00
relations_test.rb Move test to the proper file 2014-05-26 23:50:49 -03:00
reload_models_test.rb
result_test.rb Encapsulate knowledge of type objects on ActiveRecord::Result 2014-06-22 09:00:15 -06:00
sanitize_test.rb
schema_dumper_test.rb fk: dump foreign keys at the bottom to make sure tables exist. 2014-06-26 22:03:49 +02:00
serialization_test.rb Ensure we always define attribute methods 2014-06-13 10:52:39 -06:00
serialized_attribute_test.rb Deprecate serialized_attributes without replacement 2014-06-14 06:21:28 -06:00
statement_cache_test.rb
store_test.rb Introduce an Attribute object to handle the type casting dance 2014-06-13 10:20:54 -06:00
test_case.rb Remove dead test code for unsupported adapters 2014-05-17 13:24:25 -06:00
timestamp_test.rb Timestamp values should be present on callbacks 2014-06-09 17:27:32 -03:00
transaction_callbacks_test.rb
transaction_isolation_test.rb
transactions_test.rb Clear transaction state if callback raise rollback 2014-05-15 16:29:16 -04:00
types_test.rb Merge pull request #15788 from sgrif/sg-mutable-strings 2014-06-27 15:17:47 -03:00
unconnected_test.rb
validations_repair_helper.rb
validations_test.rb Add AR::Base#validate! method 2014-06-23 16:11:06 +03:00
xml_serialization_test.rb Test the serialized types of virtual columns in XML 2014-06-01 11:42:53 -06:00
yaml_serialization_test.rb Keep the types of virtual columns after yaml serialization 2014-06-10 08:42:47 -06:00