Changeset [2bcb6467429cda436c6010fe57a4bc7d1e0c16e9] by Dan Kubb

July 20th, 2011 @ 09:53 PM

Setup the allowed writer method in Model#finalize

  • This is superior to memoizing the value because Model#finalize should only be called when the model has all the properties/methods added to it.
  • Models must be finalize before instances being used. This was always always the contract, however the specs never enforced that. Now that this change is applied Model#finalize must be performed before using the initialized objects. Fixed the specs to comply with this.

Committed by Dan Kubb

  • M lib/dm-core/model.rb
  • M spec/semipublic/associations/many_to_many_spec.rb
  • M spec/semipublic/associations/many_to_one_spec.rb
  • M spec/semipublic/associations/one_to_many_spec.rb
  • M spec/semipublic/associations/one_to_one_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 »