drapergem/draper — pull request #385 by haines (2012-12-13 06:47:07+00:00)
Title: Restore context

Includes #384 but after rebasing master it wouldn't merge cleanly back into @tovodeverett's branch, sorry! One less merge commit this way I guess.

I just changed it so it wasn't storing context in the options hash unnecessarily, which was one of my main objections with the original implementation that I removed.

I also came up with a neater way to avoid forcing enumeration in CollectionDecorator when changing the context.

I'd still like to refactor `DecoratedAssociation#decorator_options` but it's all in the private interface so it's not a blocker.