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

Fixes #13750 update documentation to cast getJSON to compliant promise #13752

Merged
merged 1 commit into from
Jun 27, 2016

Conversation

habdelra
Copy link
Contributor

@habdelra
Copy link
Contributor Author

Note: here's a twiddle showing that this approach works https://ember-twiddle.com/55ae031da0bfe8647440410ce9016d67

@habdelra habdelra changed the title Fixes #13750 update documentation to cast getJSON to compliant promise Fixes #13750 (Wicked Good Ember)update documentation to cast getJSON to compliant promise Jun 26, 2016
@habdelra habdelra changed the title Fixes #13750 (Wicked Good Ember)update documentation to cast getJSON to compliant promise Fixes #13750 update documentation to cast getJSON to compliant promise Jun 26, 2016
@@ -60,6 +60,9 @@ function tap(proxy, promise) {

When the $.getJSON completes, and the promise is fulfilled
with json, the life cycle attributes will update accordingly.
Note that $.getJSON doesn't return an ECMA spcified promise,
Copy link
Member

Choose a reason for hiding this comment

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

Small typo here: s/spcified/specified/

@habdelra habdelra force-pushed the promise-proxy-mixin-doc branch from c2b18fc to 26879fa Compare June 26, 2016 23:55
@habdelra
Copy link
Contributor Author

@rwjblue needs your eyes

@rwjblue
Copy link
Member

rwjblue commented Jun 27, 2016

@habdelra - 👓

@rwjblue rwjblue merged commit 62bd268 into emberjs:master Jun 27, 2016
@rwjblue
Copy link
Member

rwjblue commented Jun 27, 2016

Thank you!

@@ -38,7 +38,7 @@ function tap(proxy, promise) {
let ObjectPromiseProxy = Ember.ObjectProxy.extend(Ember.PromiseProxyMixin);

let proxy = ObjectPromiseProxy.create({
promise: $.getJSON('/some/remote/data.json')
promise: Ember.RSVP.cast($.getJSON('/some/remote/data.json'))
Copy link
Contributor

Choose a reason for hiding this comment

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

Ember.RSVP.cast is actually undocumented and in the source seems to be an alias to resolve Maybe resolve is a better choice since it is documented and used in the guides.

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.

3 participants