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

Allow adding GenericFile to GenericWork in memory (without saving either object) #146

Open flyingzumwalt opened 9 years ago

flyingzumwalt commented 9 years ago

This is the best example I could find with a quick search in sufia-core. There are definitely more in curation_concerns.

sufia-core catalog_controller.rb Had to rewrite this, which never actually saves the GenericWork and GenericFile objects https://github.com/projecthydra-labs/sufia-core/blob/migrate_to_curation_concerns/spec/controllers/catalog_controller_spec.rb#L114-L135 and replace it with this: https://github.com/projecthydra-labs/sufia-core/blob/migrate_to_curation_concerns/spec/controllers/catalog_controller_spec.rb#L114-L135

flyingzumwalt commented 9 years ago

@elrayle @jcoyne

grosscol commented 8 years ago

Getting the associations without a call to save is the primary hurdle? Is the goal of this to speed up tests?

tpendragon commented 8 years ago

I think it's more than just tests - you should be able to build things up in memory before persisting, and right now you can't. Seems related to https://github.com/projecthydra/active_fedora/pull/858