Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8775457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:48:12+00:00 2026-06-13T18:48:12+00:00

Fairly straight-forward Ember question here, (I hope!). I have a simple Ember-data setup. One

  • 0

Fairly straight-forward Ember question here, (I hope!).

I have a simple Ember-data setup. One App has many Versions. Here’s my App model:

App.App = DS.Model.extend({
  name: DS.attr('string'),
  publicKey: DS.attr('string'),
  versions: DS.hasMany('App.Version', { key: 'version_ids' })
});

My router is fairly simple:

App.Router = Ember.Router.extend({
  location: 'hash',
  root: Ember.Route.extend({
    index: Ember.Route.extend({
      route: '/',
      redirectsTo: 'dashboard'
    }),
    dashboard: ...,
    app: Ember.Route.extend({
      route: '/:app_id',
      connectOutlets: function(router, app) {
        router.get('applicationController').connectOutlet('appTest', app);
      },

      index: Ember.Route.extend({
        route: '/',
        connectOutlets: function(router) {
          appTestController = router.get('appTestController');
          appTestController.connectOutlet('addCommentOutlet', 'addComment', {});
          appTestController.connectOutlet('versions', appTestController.get('content.versions'));
        }
      })
    })
  })
});

And the views and controllers look like this:

App.AppTestView = Ember.View.extend({
  templateName: 'app_test'
});

App.VersionsView = Ember.View.extend({
  templateName: 'versions'
});

App.AppTestController = Ember.ObjectController.extend({
});

App.VersionsController = Ember.ArrayController.extend({
});

When I run it unfortunately I get the error: an Ember.CollectionView's content must implement Ember.Array. You passed <App.Version:ember519>.

Interestingly, if I add brackets around [appTestController.get('content.versions')] in the router it doesn’t complain and creates an array with the first Version object correctly. But it doesn’t seem to want to show more than one object.

Any tips?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T18:48:14+00:00Added an answer on June 13, 2026 at 6:48 pm

    In the end, it wasn’t the models, view objects or controllers! It wasn’t even the router.

    It was versions.handlebars. I had a loop within a loop in my template, as below:

    {{#each version in controller}}
      Version here
      {{#each comment in version}}
        {{comment.text}}
      {{/each}}
    {{/each}}
    

    I’d incorrectly written:

    each comment in version
    

    … where I’d meant to write:

    each comment in version.comments
    

    🙂 That explains the error message. Hope this helps somebody else!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My web app, up until this point, has been fairly straight forward. I have
I have a question which i suspect is fairly straight forward. I have the
I currently have a fairly straight forward app, my first attempt at MVVM using
I have a fairly straight forward question. I have a commandline application I'm writing
I have a fairly straight-forward navigation based app. It is like a wizard in
I'm following a tutorial here It's fairly straight forward and simple, only 2 steps.
I have a fairly straight-forward sequential approval workflow that has an EnableModificationActivity that is
My question is fairly straight forward and hopefully simple. I've got a database that
Fairly straight-forward question here. Been looking over some code and I've seen a function
Fairly straight forward question but Googling hasn't turned up anything as yet. How do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.