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

[CLEANUP beta] Remove {{each model}} (single arg each). #11777

Merged
merged 1 commit into from Jul 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 0 additions & 63 deletions packages/ember-htmlbars/tests/helpers/each_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -640,37 +640,6 @@ QUnit.test('views inside #each preserve the new context [DEPRECATED]', function(
equal(view.$().text(), 'AdamSteve');
});

QUnit.test('single-arg each defaults to current context [DEPRECATED]', function() {
runDestroy(view);

view = EmberView.create({
context: A([{ name: 'Adam' }, { name: 'Steve' }]),
template: compile('{{#each}}{{name}}{{/each}}')
});

expectDeprecation(function() {
runAppend(view);
}, eachDeprecation);

equal(view.$().text(), 'AdamSteve');
});

QUnit.test('single-arg each will iterate over controller if present [DEPRECATED]', function() {
runDestroy(view);

view = EmberView.create({
controller: A([{ name: 'Adam' }, { name: 'Steve' }]),
template: compile('{{#each}}{{name}}{{/each}}'),
container: container
});

expectDeprecation(function() {
runAppend(view);
}, eachDeprecation);

equal(view.$().text(), 'AdamSteve');
});

function testEachWithItem(moduleName, useBlockParams) {
QUnit.module(moduleName, {
setup() {
Expand Down Expand Up @@ -800,38 +769,6 @@ function testEachWithItem(moduleName, useBlockParams) {
equal(view.$().text(), 'BobSteve');
});

if (!useBlockParams) {
QUnit.test('{{each}} without arguments [DEPRECATED]', function() {
expect(2);

view = EmberView.create({
controller: A([{ name: 'Adam' }, { name: 'Steve' }]),
template: compile('{{#each}}{{name}}{{/each}}')
});

expectDeprecation(function() {
runAppend(view);
}, eachDeprecation);

equal(view.$().text(), 'AdamSteve');
});

QUnit.test('{{each this}} without keyword [DEPRECATED]', function() {
expect(2);

view = EmberView.create({
controller: A([{ name: 'Adam' }, { name: 'Steve' }]),
template: compile('{{#each this}}{{name}}{{/each}}')
});

expectDeprecation(function() {
runAppend(view);
}, eachDeprecation);

equal(view.$().text(), 'AdamSteve');
});
}

if (useBlockParams) {
QUnit.test('the index is passed as the second parameter to #each blocks', function() {
expect(3);
Expand Down
2 changes: 0 additions & 2 deletions packages/ember-template-compiler/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { registerPlugin } from 'ember-template-compiler/plugins';

import TransformWithAsToHash from 'ember-template-compiler/plugins/transform-with-as-to-hash';
import TransformEachIntoCollection from 'ember-template-compiler/plugins/transform-each-into-collection';
import TransformSingleArgEach from 'ember-template-compiler/plugins/transform-single-arg-each';
import TransformOldBindingSyntax from 'ember-template-compiler/plugins/transform-old-binding-syntax';
import TransformOldClassBindingSyntax from 'ember-template-compiler/plugins/transform-old-class-binding-syntax';
import TransformItemClass from 'ember-template-compiler/plugins/transform-item-class';
Expand All @@ -22,7 +21,6 @@ import DeprecateViewHelper from 'ember-template-compiler/plugins/deprecate-view-
import 'ember-template-compiler/compat';

registerPlugin('ast', TransformWithAsToHash);
registerPlugin('ast', TransformSingleArgEach);
registerPlugin('ast', TransformEachIntoCollection);
registerPlugin('ast', TransformOldBindingSyntax);
registerPlugin('ast', TransformOldClassBindingSyntax);
Expand Down

This file was deleted.