ControllerExtensions = Ember.Mixin.create
  # conveniance wrapper for open modal. Use like:
  #   @modal "edit_table", model: table
  modal: (name, options={})->
    @send "openModal", "modals/#{name}", options.model || Ember.Object.create(),
      controller: 'modal'
      ok: options.ok
      close: options.close
  all_sections: (-> @store.all('section')).property()

Ember.Controller.reopen ControllerExtensions
Ember.ArrayController.reopen ControllerExtensions
Ember.ObjectController.reopen ControllerExtensions
