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

Use idiomatic Ember in autosubscribe mixin. #12

Merged
merged 1 commit into from
Apr 11, 2016

Conversation

rwjblue
Copy link
Contributor

@rwjblue rwjblue commented Apr 11, 2016

There is no need to mutate the instance in init when we can just call _super from the methods themselves.

This also fixes two bugs when including this mixin:

  • a user specified beforeModel would no longer block properly when a promise was returned
  • Function.prototype.bind is not present in PhantomJS 1.9

There is no need to mutate the instance in `init` when we can just call `_super` from the methods themselves.

This also fixes a bug where including this mixin would make the return value of `beforeModel` not properly block on a promise.
@rwjblue
Copy link
Contributor Author

rwjblue commented Apr 11, 2016

Failing tests were introduced prior to this change, see #13 for details.

var paramsRelay = this.get('paramsRelay');
var params = this.paramsFor(this.routeName);
beforeModel() {
var paramsRelay = this.get('paramsRelay');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, forgot about this 👍

@knownasilya knownasilya merged commit 58afde7 into knownasilya:master Apr 11, 2016
@knownasilya
Copy link
Owner

Sweet, thanks! I feel better already.

@rwjblue rwjblue deleted the patch-2 branch April 11, 2016 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants