radar / guides

Guides for Ruby and Elixir and whatever else I feel like
1.52k stars 164 forks source link

Ember guide: creating a new post bug #55

Closed tomash closed 10 years ago

tomash commented 10 years ago

section creating a new post, there's a new.js.coffee code ending with

route.transitionToRoute('post', model)

This causes a Uncaught TypeError: Object [object Object] has no method 'transitionToRoute' error messsage.

After some googling I found out that transitionToRoute is available within a controller, but since we're coding inside the router the proper call is transitionTo. And indeed changing the above line to

route.transitionTo('post', model)

makes it work as intended.

radar commented 10 years ago

I've fixed this when I fixed #53. Thanks!