Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate Controller#content alias #15528

Merged
merged 1 commit into from
Aug 3, 2017
Merged

Deprecate Controller#content alias #15528

merged 1 commit into from
Aug 3, 2017

Commits on Aug 1, 2017

  1. Remove ControllerContentModelAliasDeprecation for deprecatingAlias

    So, this is kind of a fun one.
    
    From what I can tell, `ControllerContentModelAliasDeprecation` was
    introduced, due to Controllers having a `content` property, which
    `model` was aliased to.
    This was done because `ObjectController` and `ArrayController`
    were proxying controllers.
    
    But, in Ember, routes set up the `model` property of its respective
    controller.
    What this meant is that if someone declared a `content` property
    in their controller, `model` would—seemingly unrelated—break,
    hence the `ControllerContentModelAliasDeprecation` mixin.
    
    Nowadays it is fine to override `content` because the source of
    truth was reverse, and `model` is now the primary property, being
    `content` the alias.
    It is, then, time to remove the old deprecation and instead
    deprecate the alias itself, so that in the future users can define
    a `content` property in their controllers if they so desire.
    
    Another API bites the dust.
    Here's to removing yet more code in the future, and make Ember
    sparkle-clean.
    locks committed Aug 1, 2017
    Configuration menu
    Copy the full SHA
    2058272 View commit details
    Browse the repository at this point in the history