App.IndexController = Ember.ObjectController.extend({
  isLoading: false,
  isDisabled: false,
  
  actions: {
    openDoor: function() {
      var self = this;
      self.set('isLoading', true);
      self.set('isDisabled', true);
      
      Ember.$.get('/open_door', function() {
        self.set('isLoading', false);
        // prevent spamming:
        setTimeout(function() {
          self.set('isDisabled', false);
        }, 5000);
      });
    }
  }
});

(function() {
  "use strict";
  
  App.IndexController = Ember.ObjectController.extend({
    isLoading: false,
    isDisabled: false,
    
    actions: {
      openDoor: function() {
        var self = this;
        self.set('isLoading', true);
        self.set('isDisabled', true);
        
        Ember.$.get('/open_door', function() {
          self.set('isLoading', false);
          // prevent spamming:
          setTimeout(function() {
            self.set('isDisabled', false);
          }, 5000);
        });
      }
    }
  });
  
}());

Put index controller into "use strict"; block.
Put index controller into "use strict"; block.
