ember-addons/bootstrap-for-ember — pull request #50 by mattmazzola (2013-10-24 00:05:22+00:00)
Title: Set context within a modal dialogue to the controller supplied in the ca...

I'm kind of a GitHub noob and I don't use coffee script so if this request is garbage sorry ahead of time.

1st change: the rename of the Modal to modalComponent
The container.lookup method returns object instances so it is more proper to use lowercase variable names.
See: http://emberjs.com/api/classes/Ember.Controller.html#method_lookup
Also, because we are working with the current instance it seems more appropriate to be using setProperties instead of reopen.

3rd change: remove unnecessary assignment of name.
This will be reset when we call setProperties anyways.

2nd change: Setting the controller property on the Ember.View.
Without this change, all of the data from the controller must be accessed through `targetObject`. To me it makes more sense for the templates designed for modals to have the same behavior as other templates outside of modals. That is they first target the controller, then the controllers model, etc...