Created
April 21, 2013 17:35
-
-
Save mcansky/5430383 to your computer and use it in GitHub Desktop.
I need to use another attribute (a hash, which is the id from a cloudant db) rather than id. Being new to ember, I am wondering how the route and controller need to be. Is there anything special to do for the linkTo too ? finally, is there a part of the doc treating of such cases ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| App.Router.map(function() { | |
| this.resource('post', { path: '/posts/:post_id' }); | |
| }); | |
| App.PostRoute = Ember.Route.extend({ | |
| model: function(params) { | |
| return App.Post.find({hash: params.post_some_attr}); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment