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

Extend Controller instead of Route #92

Open
henkvanramshorst opened this issue Aug 16, 2016 · 1 comment
Open

Extend Controller instead of Route #92

henkvanramshorst opened this issue Aug 16, 2016 · 1 comment

Comments

@henkvanramshorst
Copy link

Not sure I'm right because I just started learning Ember, but I think I ran into an error.

In the paragraph "Deleting friends" you have the following code block:

app/controllers/friends/show.js
import Ember from 'ember';

export default Ember.Route.extend({
  actions: {
    delete(friend) {
      friend.destroyRecord().then(() => {
        this.transitionToRoute('friends.index');
      });
    }
  }
});

I wasn't able to delete a friend from the show page. I got it working by replacing "Ember.Route.extend" with "Ember.Controller.extend".

@abuiles
Copy link
Owner

abuiles commented Aug 16, 2016

Oh, that's a typo!

Thanks, I'll fix it up :)

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

No branches or pull requests

2 participants