Changeset [f46c6ea9a02471c82bdd3256320373a878950f11] by Dan Kubb

November 10th, 2009 @ 04:47 PM

Replaced :nullable option with :required in Property declarations

  • The :required option reads much better than the word :nullable, and there was much confusion in the API, especially in dm-validations, around how :nullable should be mapped to the validations. Now that the options are consistent across the board it should be much simpler to map them.
  • Added :allow_nil option in Property declaration. When true will allow the value to be nil.
  • Added :allow_blank option in Property declaration. When true will allow the value to be blank.
  • The :required option will set :allow_nil and :allow_blank. When :required is true, :allow_nil and :allow_blank will be set to false.

[#935] http://github.com/datamapper/dm-core/commit/f46c6ea9a02471c82bdd325...

Committed by Dan Kubb

  • M lib/dm-core/associations/many_to_one.rb
  • M lib/dm-core/migrations.rb
  • M lib/dm-core/property.rb
  • M lib/dm-core/query.rb
  • M lib/dm-core/spec/adapter_shared_spec.rb
  • M lib/dm-core/spec/data_objects_adapter_shared_spec.rb
  • M lib/dm-core/type.rb
  • M lib/dm-core/types/discriminator.rb
  • M spec/public/associations/many_to_many_spec.rb
  • M spec/public/associations/many_to_one_spec.rb
  • M spec/public/associations/one_to_many_spec.rb
  • M spec/public/associations/one_to_one_spec.rb
  • M spec/public/collection_spec.rb
  • M spec/public/model/relationship_spec.rb
  • M spec/public/model_spec.rb
  • M spec/public/property/object_spec.rb
  • M spec/public/property_spec.rb
  • M spec/public/resource_spec.rb
  • M spec/public/sel_spec.rb
  • M spec/public/shared/collection_shared_spec.rb
  • M spec/public/transaction_spec.rb
  • M spec/public/types/discriminator_spec.rb
  • M spec/semipublic/associations_spec.rb
  • M spec/semipublic/property_spec.rb
  • M spec/semipublic/query/conditions/operation_spec.rb
  • M spec/semipublic/query/conditions_spec.rb
  • M spec/semipublic/query_spec.rb
New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »