# Extending nested resource routes

**URL:** https://meta.discourse.org/t/extending-nested-resource-routes/40704
**Category:** Development
**Created:** [March 7, 2016, 8:24pm UTC](https://meta.discourse.org/t/extending-nested-resource-routes/40704 "2016-03-07T20:24:59Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [March 7, 2016, 8:24pm UTC](https://meta.discourse.org/t/extending-nested-resource-routes/40704/1 "2016-03-07T20:24:59Z")

</div>

I’m trying to learn Ember as I build for Discourse so forgive me if this is simple. I’m attempting to add a route underneath the userActivity resource. If I understand correctly, I should be able to do something along these lines:

```javascript
export default {
  resource: 'user.userActivity',
  map() {
    this.route('votes');
  }
};

```

But that doesn’t do it. I’ve read through these two topics:

> [@Developing Discourse Plugins - Part 5 - Add an admin interface](https://meta.discourse.org/t/beginners-guide-to-creating-discourse-plugins-part-5-admin-interfaces/31761):
>
> Previous tutorial: [Developing Discourse Plugins - Part 4 - Setup git](https://meta.discourse.org/t/developing-discourse-plugins-part-4-setup-git/31272) Sometimes [site settings](https://meta.discourse.org/t/beginners-guide-to-creating-discourse-plugins-part-3-custom-settings/31115) aren’t enough of an admin interface for your plugin to work the way you want. For example, if you install the [discourse-akismet](https://github.com/discourse/discourse-akismet) plugin, you might have noticed that it adds a navigation item to the admin plugins section in of your Discourse: In this tutorial we’ll show you how to add an admin interface for your plugin. I’m going to call my plugin purple-tentacle, in honor of [one of my favorit…](https://en.wikipedia.org/wiki/Day_of_the_Tentacle)

[https://meta.discourse.org/t/add-custom-route-from-initializer/36859](https://meta.discourse.org/t/add-custom-route-from-initializer/36859)

---

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [March 10, 2016, 5:33pm UTC](https://meta.discourse.org/t/extending-nested-resource-routes/40704/2 "2016-03-10T17:33:15Z")

</div>

For those that run into this issue, here’s what I found that seems to work:

```javascript
export default {
  resource: 'user',
  path: 'users/:username',
  map() {
    this.resource('userActivity', {path: 'activity'}, function(){
      this.route('votes')
    })
  }
};

```
