Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge branch 'master' into beta
Conflicts: Gemfile.lock VERSION
- Loading branch information
Showing
35 changed files
with
364 additions
and
106 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
require("ember-data/system/container_proxy"); | ||
|
||
Ember.onLoad('Ember.Application', function(Application) { | ||
Application.initializer({ | ||
name: "activeModelAdapter", | ||
|
||
initialize: function(container, application) { | ||
application.register('serializer:_ams', DS.ActiveModelSerializer); | ||
application.register('adapter:_ams', DS.ActiveModelAdapter); | ||
var proxy = new DS.ContainerProxy(container); | ||
proxy.registerDeprecations([ | ||
{deprecated: 'serializer:_ams', valid: 'serializer:-active-model'}, | ||
{deprecated: 'adapter:_ams', valid: 'adapter:-active-model'} | ||
]); | ||
|
||
application.register('serializer:-active-model', DS.ActiveModelSerializer); | ||
application.register('adapter:-active-model', DS.ActiveModelAdapter); | ||
} | ||
}); | ||
}); |
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
22 changes: 22 additions & 0 deletions
22
packages/activemodel-adapter/tests/unit/adapter/path_for_type_test.js
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,22 @@ | ||
var env, store, adapter; | ||
module("unit/adapter/path_for_type - DS.ActiveModelAdapter#pathForType", { | ||
setup: function() { | ||
env = setupStore({ | ||
adapter: DS.ActiveModelAdapter | ||
}); | ||
|
||
adapter = env.adapter; | ||
} | ||
}); | ||
|
||
test('pathForType - works with camelized types', function() { | ||
equal(adapter.pathForType('superUser'), "super_users"); | ||
}); | ||
|
||
test('pathForType - works with dasherized types', function() { | ||
equal(adapter.pathForType('super-user'), "super_users"); | ||
}); | ||
|
||
test('pathForType - works with underscored types', function() { | ||
equal(adapter.pathForType('super_user'), "super_users"); | ||
}); |
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
Oops, something went wrong.