Idiomatic way to do resources


#1

I’m struggling with what seems like a relatively straight forward situation with nested routes.

I have

users/
users/new
users/:user_id
users/:user_id/edit

coming from a rails universe this would map to

users/index
users/new
users/show
users/edit

I have no desire for any of the different templates to be nested within each other but model access would be needed.

I took a look at this post Idiomatic way to have nested routes without nesting templates on nested routes as well as reading the documentation and a few other posts on nesting routes / resources in ember, but was unable to find a clear answer for the ember way to do this.

I have now

resource users
  resource user, path: ':user_id'
    route show, path: ''
    route edit
  route index, path: ''
  route new

this seems oddly complex for one resource and results in needing a users and a user folder.

If anyone could shed some light on this it would be greatly appreciated.