Created
July 17, 2015 22:08
-
-
Save biscuitvile/352305495a727f5462d7 to your computer and use it in GitHub Desktop.
This file contains 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
import DS from "ember-data"; | |
import Ember from "ember"; | |
import ENV from "frontent/config/environment"; | |
function formatAttributeName(attr) { | |
if (ENV['ember-cli-mirage'].enabled) { | |
return Ember.String.camelize(attr); | |
} else { | |
return Ember.String.decamelize(attr); | |
} | |
} | |
export default DS.JSONAPISerializer.extend({ | |
keyForAttribute: function(attr) { | |
return formatAttributeName(attr); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment