datamapper / dm-validations

Library for performing validations on DM models and pure Ruby object
http://datamapper.org/
MIT License
50 stars 43 forks source link

Externalize auto validation #30

Closed emmanuel closed 13 years ago

emmanuel commented 13 years ago

OK, I think this is the last one for a while, but after the last set of pulls I realized that AutoValidations is full of stateless methods and doesn't need to add them all to Model.

The last commit in this pull request moves the setup of AutoValidation from Property.new to Model#property, I don't have a specific justification for this move, other than the sense that AutoValidation is more a responsibility of Model creating and binding a property than of Property initialization generally. Also, if a Property is created by Property.new but not via Model#property, that property probably shouldn't be auto-validated.

xaviershay commented 13 years ago

Looks good, my only query was doc related so merging.