This release marks the gem to be stable enough.
- Delegate missing presenter class methods to a model class.
- An optional
engine:
parameter forMagic.eager_load
to be used by other engines to make their presenters visible for lookups. Magic.each_engine
to iterate over all the engines attached.
Magic::Presenter::TestCase
to test presenters.- View context with routing helpers for presenter specs.
- Generate presenters instead of helpers.
undefined method 'configure' for module RSpec
.- Instance variables assignment in views.
- Added a section about testing.
- View helpers inside presenter context.
- View helpers for presenters within views.
- View helpers for presenters within controllers.
- View helpers for presenters within mailers.
- Auto decoration in views.
- Active Job support via implementing Global ID.
Magic::Presenter::Base.model_class
as the inverse ofMagic::Presenter::Base.for
.Magic.eager_load
to eagerly load different class scopes, be them presenters, models or whatever else.
- Enhanced presenter naming rules.
- Generators:
magic:presenter:install
presenter
- Test::Unit
- RSpec
- Integration with Active Record models.
- Lookup error reporting:
Magic::Presenter
should be used as a lookup base instead ofMagic::Decorator
. - Magic Lookup requires presenters to be eagerly loaded to be accessible via lookups.
Magic::Presenter::Base
— a basic presenter class.Magic::Presentable
to be included in presentable classes.#decorate
,#decorate!
,#decorated
,#decorated?
.