correct a tiny typo
Refactor of method_missing on Draper::Base for ease of reading
draper:decorator defaults to rspec too
Allow multiple allows / inherit allows
Add basic example for decorates_association to Readme
Added .source / .to_source both to Base and DecoratedEnumerableProxy. Made options accept both class and class_name.
Don't cache @decorator_proxy in Draper::ModelSupport::ClassMethods#decorate.
NoMethodError swallowed from inside delegated methods
When a delegated method calls a non-existant method the correct NoMethodError should be called. If the NoMethodError is swallowed by the decorator it can cause problems with BDD workflow.
…ecord and help to unify code. :class / :class_name can now be strings too!
…corate. 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 caused all subsequent calls to decorate on ActiveRecord::Base descendant classes and their corresponding ActiveRecord::Relations to always return this same DecoratedEnumerableProxy, which could 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 no longer occurs.