"Route Actions" Errors

There are a ton of errors in the code for this section-- if you are trying to move create() and cancel() from the controller to the route, this worked for me:

app/routes/sightings/new.js

import Ember from 'ember';

export default Ember.Route.extend({
    model() {
        return Ember.RSVP.hash({
            sighting: this.store.createRecord('sighting'),
            cryptids: this.store.findAll('cryptid'),
            witnesses: this.store.findAll('witness')
        });
    },
    sighting: Ember.computed.alias('controller.model.sighting'),
    actions: {
        willTransition() {
            var sighting = this.get('controller.model.sighting');
            if (sighting.get('hasDirtyAttributes')) {
                sighting.deleteRecord();
            }
        },
        create() {
            var self = this;
            this.get('sighting').save().then(function(data){
                self.transitionTo('sightings');
            });
        },
        cancel() {
            var self = this;
            this.get('sighting').deleteRecord();
            self.transitionTo('sightings');
        }
    }
});

I think the only error in the book text is in the cancel action for the line to transition to the sightings route

    cancel() {
      this.get('sighting').deleteRecord();
      this.transitionToRoute('sightings');
    }
 this.transitionTo('sightings');

The transitionToRoute is a controller method, not a route method.

Is the delete actually supposed to work ? I am getting an ember error that says the delete action is not handled ?

Disregard. the attack of the extra curly brace strikes again. odd thta it wasnt a syntax error.