Passing a view instance to the template view helper fails
Passing a view instance to the view helper worked fine in 1.7.0, but it has stopped working after the helper refactor. In 1.8.0 it fails and logs this message:
Assertion Failed: <instanceVbleName> must be a subclass of Ember.View, not <App.YourViewClass:ember857>
It's strange, because there is a method instanceHelper in the ViewHelper class, but that method is not called anywhere. It seems like now the helper doesn't identify properly an instance from the name of a class.
@ablanco - Can you provide a small JSBin that demonstrates the issue?
Here is the code: JSBin
The code there crashes, but if you remove the second view helper from the template then it will render properly. That second view helper is the one trying to load a view instance instead of a view class. Is this line:
{{view alertView}}
Removing that line everything works, but with that line on the template Ember crashes because it doesn't recognize alertView as a view instance. If you change the line loading Ember 1.8.0 in order to load Ember 1.7.0 it will work fine too, even with the second view helper on the template.
It seems like a regression in Ember 1.8.0.
smells like a regression
Agreed.
This was fixed for stable branch in #9438. Still needs updates for streamified master branch before closing.
Thanks for the quick fix!
Closing this issue, as the PR for master is pending review (and this is already fixed on stable).
Still broken for me. This code was working fine when I was still on 1.7
Error:

Code:


This issue is also happening with me.


Should be fixed in #9881 folks. @rwjblue we may want to cut that 1.9.1 release this weekend.
@mixonic - Agreed, that was my thought. I have a couple other things I would like to get in, but am waiting on feedback/clarification.
this seems to be still broken even after the fix in #9881
@balaf - please open a new issue with a reproducing JSBin
Disregard. I can't reproduce it anymore. it must have been my mistake. Works fine
Hi @rwjblue same issue with me, ember-cli version is 0.2.0-beta.1
this is my view code
and this is my template code
showing this error in console
