0

I have updated to ember-cli@0.2.3 and am getting the following error message when running ember serve on an addon project of mine to start the dummy app.

Uncaught Error: Assertion Failed: The value that #each loops over must be     an Array. You passed [search,create,read,update,delete]

controller has:

operations : ['search', 'create', 'read', 'update', 'delete'],

template.hbs has:

{{view "select" content=operations value=selectedOperation class="form-control"}}

The other thing I have noticed is that it appears EXTEND_PROTOTYPES is turned off by default or something because I have to change my .property() values to 'Ember.computed` instead.

jax
  • 37,735
  • 57
  • 182
  • 278

1 Answers1

0

This is caused because prototypes are turned off by default for addons. Ember's each helper expects an Ember array. Since prototype extenstions are turned off you will need to manually wrap an array in Em.A

operations : Em.A(['search', 'create', 'read', 'update', 'delete']),

This blog post from dockyard will be helpful on updating addons.

blessanm86
  • 31,439
  • 14
  • 68
  • 79
  • Thanks, it turns out that ember-cli now turns off prototype extensions for addons by default. Therefore in test/dummy it seems to be turned off. – jax May 15 '15 at 12:07