Update ember and ember-data

This commit is contained in:
Piotr Sarnacki 2012-09-26 15:07:52 +02:00
parent 6207eecbcf
commit b31515fa57
3 changed files with 9533 additions and 6417 deletions

View File

@ -1748,6 +1748,7 @@ DS.Store = Ember.Object.extend({
loadMany: function(type, ids, hashes) { loadMany: function(type, ids, hashes) {
var clientIds = Ember.A([]); var clientIds = Ember.A([]);
if (hashes === undefined) { if (hashes === undefined) {
hashes = ids; hashes = ids;
ids = []; ids = [];
@ -3155,7 +3156,7 @@ DS.Model = Ember.Object.extend(Ember.Evented, {
also call methods with the given name. also call methods with the given name.
*/ */
trigger: function(name) { trigger: function(name) {
this[name].apply(this, [].slice.call(arguments, 1)); Ember.tryInvoke(this, name, [].slice.call(arguments, 1));
this._super.apply(this, arguments); this._super.apply(this, arguments);
} }
}); });
@ -3671,8 +3672,8 @@ DS.Adapter = Ember.Object.extend({
(function() { (function() {
var set = Ember.set; var set = Ember.set;
Ember.onLoad('application', function(app) { Ember.onLoad('Ember.Application', function(Application) {
app.registerInjection({ Application.registerInjection({
name: "store", name: "store",
before: "controllers", before: "controllers",
@ -3683,11 +3684,11 @@ Ember.onLoad('application', function(app) {
} }
}); });
app.registerInjection({ Application.registerInjection({
name: "giveStoreToControllers", name: "giveStoreToControllers",
injection: function(app, stateManager, property) { injection: function(app, stateManager, property) {
if (property.match(/Controller$/)) { if (/^[A-Z].*Controller$/.test(property)) {
var controllerName = property.charAt(0).toLowerCase() + property.substr(1); var controllerName = property.charAt(0).toLowerCase() + property.substr(1);
var store = stateManager.get('store'); var store = stateManager.get('store');
var controller = stateManager.get(controllerName); var controller = stateManager.get(controllerName);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff