Skip to content

Instantly share code, notes, and snippets.

@wmarbut
Created March 3, 2013 20:10
Show Gist options
  • Save wmarbut/5078059 to your computer and use it in GitHub Desktop.
Save wmarbut/5078059 to your computer and use it in GitHub Desktop.
Correctly set url hash in ember rc1 when not using ember data. Referring to SO question http://stackoverflow.com/questions/15182690/ember-js-rc1-model-hook-on-route-not-called
/* SO http://stackoverflow.com/questions/15182690/ember-js-rc1-model-hook-on-route-not-called */
serialize: function(model, params) {
if ((model != null) && model.get('id')) {
return { id: model.get('id') };
} else {
return this._super(model, params);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment