NYULibraries/ichabod — pull request #54 by chrpr (2014-08-27 14:28:07+00:00)
Title: Feature/immutable source take2

This is very incomplete and untested, but wanted to ask @scotdalton for some feedback. If this is a reasonable path to be going down, I can start digging into the large collection of (55) rspec failures and (6) cucumber failures, as well as adding a suite of tests for the model & view changes and the features of the user story.

@scotdalton had previously suggested looking into forwardable and delegatable, but I couldn't figure out exactly what to forward _to_. Instead I'm overriding the attribute setters in nyucore.rb to push the updated values to native_metadata, then saying to explicitly write them to source_metadata in the resoure_set loader.

The difficult bit, as Scot had suspected, is handling identifier (and other future "single" attributes). I'm currently handling that with logic in the _edit view, because I really do think that's a presentation layer thing, i.e. deciding which identifier field to expose in the form. I am definitely open to other suggestions.