Ember Components and ember-rails gem

How and where do you define a component handlebars file in ember-rails? More generally, is it possible to create arbitrary handlebars files outside of the conventional folder structure?

I posted an issue on github.


If this is not defined functionality yet, does somebody know of a potential workaround?

Was a dummy, forgot to move “components” folder under the templates folder.

However now my question is how do you pass a whole object structure to the component via handlebars.

For example:

Assuming a component that looks like this

<h2> Search Result </h2>
<li>Foo: {{ foo }} </li>
<li>Bar: {{ bar }} </li>
<li>Baz: {{ baz }} </li>

Is it possible to pass a whole object

{{#each result in model}}
   {{search-result result}}

and have the component template look like

<h2> Search Result </h2>
<li>Foo: {{ result.foo }} </li>
<li>Bar: {{ result.bar }} </li>
<li>Baz: {{ result.baz }} </li>

instead of

   {{ search-result foo=foo bar=bar baz=baz }}

Is this a handlebars limitation?