jcasimir/draper — pull request #117 by ohwillie (2012-01-26 20:14:31+00:00)
Title: Don't cache @decorator_proxy in Draper::ModelSupport::ClassMethods#decorate.

Prior to this commit, calling ```Draper::ModelSupport::ClassMethods#decorate``` had the unfortunately side
effect of setting ```@decorator_proxy``` once and never setting it again at the class level. This causes all subsequent calls to decorate on ```ActiveRecord::Base``` descendents and their corresponding ```ActiveRecord::Relations``` to always return this same ```DecoratedEnumerableProxy```, which can result in some very odd behavior, e.g. getting a completely different set of decorated models than you would have expected.

I've added specs to verify that this doesn't occur.