You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 17, 2018. It is now read-only.
If a DataMapper model includes ActiveModel::Validations ActiveModel's implementation will override DataMapper's. This could happen for example by using ActiveModel::SecurePassword and has_secure_password for example when not disabling the included Validations with has_secure_password(:validations => false).
I'm not sure how it could be possible to implement a ActiveModel agnostic dm-validations when both dm-validations and ActiveModel are claiming the errors method for themselves.
Perhaps this gem could include ActiveModel::Validations in every DataMapper::Resource (causing .errors to return ActiveModel::Errors). The nice effect: You could use ActiveModel validators in your DataMapper model. The problem: AFAICS this would disable all DataMapper validations. I don't know if there is an elegant solution to delegate the error retrieval back to DataMapper.