Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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: