Draper v1.0.0.beta1 Release Notes
Release Date: 2012-11-30 // over 11 years ago-
- Renaming
Draper::Base
toDraper::Decorator
. This is the most significant change you'll need to upgrade your application. 025742c - โ Added an internal Rails application for integration tests. This won't affect your application, but we're now running a set of Cucumber tests inside of a Rails app in both development and production mode to help ensure that we don't make changes that break Draper. 90a4859
- โ Add
#decorated?
method. This gives us a free RSpec matcher,be_decorated
. 834a6fd - ๐
#decorates
is no longer needed inside your models, and should be removed. Decorators automatically infer the class they decorate. e1214d9 - 0๏ธโฃ Decorators do not automatically come with 'finders' by default. If you'd like
to use
SomeDecorator.find(1)
, for example, simply add#has_finders
to the decorator to include them. 42b6f78 - To refer to the object being decorated,
#source
is now the preferred method. 1e84fcb ActiveModel::Serialization
is included in Decorators if you've requredActiveModel::Serializers
, so that decorators can be serialized. c4b3527- โ Properly support Test::Unit. 087e134
๐จ And many small bug fixes and refactorings.
- Renaming