emberjs / emberjs/ember-rails

Better documentation of the folder conventions and nested template structure

Open
#230 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
1.3k
Forks
248
PR merge metrics
No merged PRs in 30d

Description

This may just be me not understanding the conventions of ember-rails. But can someone explain the idiomatic way to nest handlebars templates in an ember-rails based project?

For example assuming the following route structure:

``` javascript
App.Router.map(function() {
this.resource('solutions', function() {
this.route('new');
this.resource('solution', { path: ':solution_id' }, function() {
this.route('overview', { path: 'overview' });
this.route('edit', { path: 'edit' });
});
});
}); // map

```

It would seem idiomatic to recursively nest folders to match the router nesting

```
/app
|-assets/
|---javascripts/
|-----myapp/
|-------templates/
|---------solutions.handlebars
|---------solutions/
|-----------index.handlebars
|-----------new.handlebars
|-----------solution/
|-------------index.handlebars
|-------------overview.handlebars
|-------------edit.handlebars
```

But ember rails seems to require the following directory structure. e.g the "solution" directory is outside the "solutions" directory:

```
/app
|-assets/
|---javascripts/
|-----myapp/
|-------templates/
|---------solutions.handlebars
|---------solutions/
|-----------index.handlebars
|-----------new.handlebars
|---------solution/
|-----------index.handlebars
|-----------overview.handlebars
|-----------edit.handlebars
```

Is this a bug? Perhaps some more documentation of implied folder conventions would be helpful. Especially around deeply nested application structures (i.e. more than two levels deep).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.