valkyrie icon indicating copy to clipboard operation
valkyrie copied to clipboard

Deprecate Automatic Draper Include

Open no-reply opened this issue 6 years ago • 1 comments

When Valkyrie::Resource#decorate is called, but there wasn't an explicit include Draper::Decoratable, it should throw a deprecation warning telling the developer to explicitly include Draper::Decoratable in their project.

Possible Implementation (needs testing)

Create a module which includes Draper::Decoratable, override #decorate in that module to throw the deprecation warning, and then include that module in Valkyrie::Resource.

Previous ticket text below.

Resource includes Draper::Decoratable by default.

Since this injects a variety of behavior (including overrides for simple operations like #== via Draper::Decoratable::Equality) that some users may want, while others may not expect. Since adding this behavior locally is as easy as include Draper::Decoratable, should Valkyrie::Resource decline to provide it by default?

no-reply avatar Oct 18 '19 00:10 no-reply

After discussion today at Samvera Connect, I'm going to take a hack at deprecating draper inclusion.

no-reply avatar Oct 22 '19 21:10 no-reply