Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

EmberJS Challenge: Customerizing urls

Here is the link to the challenge: http://teamtreehouse.com/library/emberjs/routes-and-templates/challenge-customizing-urls

Challenge Task 1 of 1

Modify the puppies route so that the path is /cute-puppies.

Sorry if this is a duplicate, but I didn't see any other forum thread

devoted to answering this challenge.

I thought it might be as easy as something like this:

AnimalShelter = Ember.Application.create();

AnimalShelter.Router.map(function() {
  this.resource('/cute-puppies');
});

..but that didn't work. :frowning:

I found this forum thread that had a line which included a 'path': https://teamtreehouse.com/forum/ember-js-questions

  this.resource('kittens', {path: '/'});

So I figured, let's see if that can be adapted from a path of '/' (with kittens) to '/cute-puppies' path:

AnimalShelter = Ember.Application.create();

AnimalShelter.Router.map(function() {
  this.resource('puppies', {path: '/cute-puppies'});
});

..and it got me through this particular challenge. :thumbsup: