I’ve been working on trying to set permalinks for posts, and so far have had some success… Using the permalink param, I can modify my router to serialize accordingly:
serialize: (model) -> post_id: model.get('permalink')
and on reload, my backend handles this custom ‘id’ parameter accordingly (I’m using the setup described here: https://github.com/heartsentwined/ember-auth-rails-demo/wiki/Model)
def show render json: Post.find_by_permalink(params[:id]) end
however I’m running into the same issue many have discussed wherein the show method successfully returns my post by permalink (and Ember uses that permalink as it’s id) and the index loads all posts with the numeric IDs, so I always wind up having a duplicate.
Since I don’t know the page id on load, im a bit confused how I can update this post with it’s actual id and hopefully remove the duplicate from the list.