samvera / hydra-works

A ruby gem implementation of the PCDM Works domain model based on the Samvera software stack
Other
24 stars 14 forks source link

FileSets and Works should barf clearly when a Collection is added as a member #276

Closed mjgiarlo closed 8 years ago

mjgiarlo commented 8 years ago

Fixes #259

mjgiarlo commented 8 years ago

This solution feels a bit heavy for what it's doing, which is spitting out a clearer error message that is supplied by Hydra::PCDM: https://github.com/projecthydra-labs/hydra-pcdm/blob/master/lib/hydra/pcdm/validators/pcdm_object_validator.rb#L2-L8 On the other hand, it follows the patterns established in the NotFileSetValidator work, so the codebase is internally consistent.

Thoughts, @jcoyne @tpendragon @escowles @elrayle ?

tpendragon commented 8 years ago

Not pretty, but it works, and I don't know a better solution. Sooo...:+1: