Created
March 3, 2013 20:10
-
-
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
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
/* 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