Hello, I have full control over a rails api and an emberjs front end.
Currently lets say we have a resource named foo that can be found only by id in the api and has a name attribute. Is it possible to implement an ember route
/foos/:foo_identifier
so that the request in store is done using the id param I pass to the route but the uri in the browser takes the name of another attribute. In short the following scenario:
Starting template {{link-to "foos.show" foo}}
foos.show route makes a request at the api (or the ember store):
return this.store.find('foo', params.foo.id)
the URI in the browser is constructed like
/foos/model.name or /foos/params.foo.name
If this is not possible, then is the only way to find the foo method by name:
return this.store.find('foo', foo.name)
?
Finally if we look at facebook’s front end and api, in the front end we have a URI for a user of the form:
/kon.asdf
however it is not possible to query the api by a user’s name. Does this mean that they dont allow external developers to query their api by a user’s name but they do query it by name in their app ?
Thanks