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

[BUGFIX release] Deprecate slash for a namespace in the {{render}} helper #11787

Merged
merged 1 commit into from Jul 17, 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
3 changes: 3 additions & 0 deletions packages/ember-routing-htmlbars/lib/keywords/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ export default {
}

// # legacy namespace
let originalName = name;
name = name.replace(/\//g, '.');
Ember.deprecate(`Using a slash for namespacing with the {{render}} render helper has been deprecated.
Please replace "${originalName}" with "${name}" in your call to the {{render}} helper.`, !originalName.match(/\//g));
// \ legacy slash as namespace support

var templateName = 'template:' + name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ QUnit.test('{{render}} works with slash notation', function() {

Ember.TEMPLATES['blog.post'] = compile('{{uniqueId}}');

runAppend(view);
expectDeprecation(() => { runAppend(view); }, /Using a slash for namespacing/);

var singletonController = container.lookup('controller:blog.post');
equal(singletonController.uniqueId, view.$().html(), 'rendered with correct singleton controller');
Expand Down