jcasimir/draper — pull request #290 by sbleon (2012-10-03 17:04:27+00:00)
Title: Raise an error if a model is redecorated,

but only if the same decorator is used twice.

This prevent users from inadvertently re-decorating their objects, and forces them to fix their incorrect code before proceeding.

This removes the code from c945cce6f3147c805b4db73580c198016750ad60 that silently fixes the user's mistake. That code could lead to unexpected behavior if you're actually trying to decorate an object with multiple, distinct decorators.

I haven't updated the docs to reflect that Draper::Base.new and Draper::Base.decorate can now throw an ArgumentError.