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] Link to attribute bindings #11594

Merged
merged 1 commit into from
Jun 29, 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
17 changes: 17 additions & 0 deletions packages/ember-routing-htmlbars/tests/helpers/link-to_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,23 @@ QUnit.test("unescaped inline form (triple curlies) does not escape link title",
equal(view.$('b').length, 1, '<b> was found');
});

QUnit.test("reopening on LinkView actually reopens on LinkComponent", function() {
expect(2);
var oldreopen = Ember.LinkComponent.reopen;

Ember.LinkComponent.reopen = function () {
ok(true, 'reopen was called on LinkComponent');
return oldreopen.apply(this, arguments);
};

expectDeprecation(function () {
Ember.LinkView.reopen({});
});

Ember.LinkComponent.reopen = oldreopen;

});

QUnit.test("unwraps controllers", function() {
var template = "{{#link-to 'index' view.otherController}}Text{{/link-to}}";

Expand Down
11 changes: 9 additions & 2 deletions packages/ember-routing-views/lib/views/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,13 +512,20 @@ var DeprecatedLinkView = LinkComponent.extend({
this._super.apply(this, arguments);
}
});
var originalReopen = DeprecatedLinkView.reopen;

DeprecatedLinkView.reopen = function reopenWithDeprecation() {
Ember.deprecate('Ember.LinkView is deprecated. Please use Ember.LinkComponent.', false);

return originalReopen.apply(this, arguments);
return LinkComponent.reopen.apply(LinkComponent, arguments);
};

DeprecatedLinkView.reopenClass({
extend: function () {
Ember.deprecate('Ember.LinkView is deprecated. Please extend from Ember.LinkComponent.', false);
this._super.apply(this, arguments);
}
});

export { DeprecatedLinkView };
/* DeprecatedLinkView - End*/

Expand Down