hydra-works icon indicating copy to clipboard operation
hydra-works copied to clipboard

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

Open flyingzumwalt opened this issue 10 years ago • 3 comments

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 avatar Jul 13 '15 16:07 flyingzumwalt

@elrayle @jcoyne

flyingzumwalt avatar Jul 13 '15 16:07 flyingzumwalt

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

grosscol avatar Aug 14 '15 15:08 grosscol

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

tpendragon avatar Aug 14 '15 15:08 tpendragon