Skip to content

Fork twiddle should save changes#134

Merged
Gaurav0 merged 7 commits intoember-cli:masterfrom
Gaurav0:fork_should_save
Aug 10, 2015
Merged

Fork twiddle should save changes#134
Gaurav0 merged 7 commits intoember-cli:masterfrom
Gaurav0:fork_should_save

Conversation

@Gaurav0
Copy link
Copy Markdown
Contributor

@Gaurav0 Gaurav0 commented Aug 5, 2015

Fixes issue #133

@stefanpenner
Copy link
Copy Markdown
Contributor

LGTM

@Gaurav0
Copy link
Copy Markdown
Contributor Author

Gaurav0 commented Aug 5, 2015

Wait, got a bug.

@Gaurav0
Copy link
Copy Markdown
Contributor Author

Gaurav0 commented Aug 5, 2015

@stefanpenner OK, now you can review.

@Gaurav0 Gaurav0 removed the working label Aug 5, 2015
Comment thread app/gist/route.js Outdated
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What is the correct way to do this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

since this is async:false toArray() should work, instead of currentState (if im reading this correctly). This should also prevent leaking the internalRecord in the forEach and likely should squash both private API usages.

@stefanpenner
Copy link
Copy Markdown
Contributor

there appears to be very API related code in the route, it might be nice to extract that.

@Gaurav0
Copy link
Copy Markdown
Contributor Author

Gaurav0 commented Aug 5, 2015

@stefanpenner Hey, the ‘very api related code’ uses private API. I was wondering if there was a correct, public, way to do that.

Comment thread app/gist/route.js Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

extracting the error callback into its own function, so it can be united tested will help cleanup this code some more. The extra verbosity distracts from the overall flow of logic.

@Gaurav0
Copy link
Copy Markdown
Contributor Author

Gaurav0 commented Aug 6, 2015

Again, it wasn't working correctly, so I took another approach.

@Gaurav0
Copy link
Copy Markdown
Contributor Author

Gaurav0 commented Aug 6, 2015

@stefanpenner Updated. Please review again.

@mmun
Copy link
Copy Markdown
Member

mmun commented Aug 6, 2015

Ideally you would keep the closure actions and move the actions off the router and into a service.

@Gaurav0
Copy link
Copy Markdown
Contributor Author

Gaurav0 commented Aug 7, 2015

@mmun Perhaps, but that should be a separate PR. Can you open an issue?

@Gaurav0
Copy link
Copy Markdown
Contributor Author

Gaurav0 commented Aug 10, 2015

@joostdevries @stefanpenner @rwjblue Can I get a review?

@stefanpenner
Copy link
Copy Markdown
Contributor

LGTM – :shipit:

Gaurav0 added a commit that referenced this pull request Aug 10, 2015
Fork twiddle should save changes
@Gaurav0 Gaurav0 merged commit f3aeff2 into ember-cli:master Aug 10, 2015
@Gaurav0 Gaurav0 deleted the fork_should_save branch August 10, 2015 21:12
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.

4 participants