Skip to content

Releases: Alexander-Senko/magic-presenter

v1.0.0

23 Nov 12:22
297e2dd
Compare
Choose a tag to compare

This release marks the gem to be stable enough.

Added

  • Delegate missing presenter class methods to a model class.
  • An optional engine: parameter for Magic.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.

Tests

  • Magic::Presenter::TestCase to test presenters.
  • View context with routing helpers for presenter specs.

Generators

  • Generate presenters instead of helpers.

Fixed

  • undefined method 'configure' for module RSpec.
  • Instance variables assignment in views.

Documentation

  • Added a section about testing.

Full Changelog: v0.4.0...v1.0.0

v0.4.0

29 Oct 22:21
Compare
Choose a tag to compare

Added

  • View helpers inside presenter context.
  • View helpers for presenters within views.
  • View helpers for presenters within controllers.
  • View helpers for presenters within mailers.

Full Changelog: v0.3.0...v0.4.0

v0.3.0

27 Oct 19:33
Compare
Choose a tag to compare

Added

  • Auto decoration in views.
  • Active Job support via implementing Global ID.
  • Magic::Presenter::Base.model_class as the inverse of Magic::Presenter::Base.for.
  • Magic.eager_load to eagerly load different class scopes, be them presenters, models or whatever else.

Full Changelog: v0.2.0...v0.3.0

v0.2.0

26 Oct 16:17
Compare
Choose a tag to compare

Added

  • Enhanced presenter naming rules.
  • Generators:
    • magic:presenter:install
    • presenter
      • Test::Unit
      • RSpec

Fixed

  • Integration with Active Record models.
  • Lookup error reporting: Magic::Presenter should be used as a lookup base instead of Magic::Decorator.
  • Magic Lookup requires presenters to be eagerly loaded to be accessible via lookups.

Full Changelog: v0.1.0...v0.2.0

v0.1.0

19 Oct 08:41
Compare
Choose a tag to compare

Added

  • Magic::Presenter::Base — a basic presenter class.
  • Magic::Presentable to be included in presentable classes.
    • #decorate,
    • #decorate!,
    • #decorated,
    • #decorated?.

Full Changelog: https://github.com/Alexander-Senko/magic-presenter/commits/v0.1.0