Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cleanup before merge

  • Loading branch information...
commit 22aa580de84aad7e2459ddd0c45b5e0d1b4e1f8a 1 parent 48feb78
tomhuda authored
View
2  .gitignore
@@ -36,5 +36,3 @@ tmp.spade
tests/source
node_modules
.vagrant
-/.vim
-/.vimrc
View
8 packages/ember-metal/lib/array.js
@@ -107,8 +107,12 @@ var utils = Ember.EnumerableUtils = {
},
replace: function(array, idx, amt, objects) {
- var args = Array.prototype.concat.apply([idx, amt], objects);
- return array.splice.apply(array, args);
+ if (array.replace) {
+ return array.replace(idx, amt, objects);
+ } else {
+ var args = Array.prototype.concat.apply([idx, amt], objects);
+ return array.splice.apply(array, args);
+ }
}
};
View
13 packages/ember-runtime/lib/controllers/array_controller.js
@@ -78,10 +78,10 @@ var get = Ember.get, set = Ember.set, isGlobalPath = Ember.isGlobalPath,
```javascript
App.MyArrayController = Ember.ArrayController.extend({
lookupItemController: function( object ) {
- if(object.get('isSpecial')) {
- return "SpecialObject"; // use SpecialObjectController
+ if (object.get('isSpecial')) {
+ return "special"; // use App.SpecialController
} else {
- return "RegularObject"; // use RegularObjectController
+ return "regular"; // use App.RegularController
}
}
});
@@ -117,10 +117,10 @@ Ember.ArrayController = Ember.ArrayProxy.extend(Ember.ControllerMixin,
```javascript
App.MyArrayController = Ember.ArrayController.extend({
lookupItemController: function( object ) {
- if(object.get('isSpecial')) {
- return "SpecialObject"; // use SpecialObjectController
+ if (object.get('isSpecial')) {
+ return "special"; // use App.SpecialController
} else {
- return "RegularObject"; // use RegularObjectController
+ return "regular"; // use App.RegularController
}
}
});
@@ -134,7 +134,6 @@ Ember.ArrayController = Ember.ArrayProxy.extend(Ember.ControllerMixin,
return get(this, 'itemController');
},
-
objectAtContent: function(idx) {
var length = get(this, 'length'),
object = get(this,'arrangedContent').objectAt(idx),
Please sign in to comment.
Something went wrong with that request. Please try again.