-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove passing factories to store methods
Previously, we allowed users to either pass factories (subclasses of DS.Model), or a string to store methods. For more consistency in the container-based world where things are looked up through strings, support for looking up via passing a factory has been removed. This is part of a refactor that will remove state (like the store) from Ember Data's factories in order to remove Ember.MODEL_FACTORY_INJECTIONS.
- Loading branch information
Stanley Stuart
committed
May 16, 2015
1 parent
22b0576
commit cff8ce5
Showing
47 changed files
with
878 additions
and
704 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import {singularize} from 'ember-inflector/lib/system/string'; | ||
|
||
var dasherize = Ember.String.dasherize; | ||
var camelize = Ember.String.camelize; | ||
|
||
/** | ||
All modelNames are dasherized internally. Changing this function may | ||
require changes to other normalization hooks (such as typeForRoot). | ||
@method normalizeModelName | ||
@private | ||
@param {String} type | ||
@return {String} if the adapter can generate one, an ID | ||
*/ | ||
export default function normalizeModelName(modelName) { | ||
return singularize(dasherize(camelize(modelName))); | ||
} |
Oops, something went wrong.