Anyone knows how to do this “properly”? I’m also using the ember-rails gem. But the folder structure is suited to just 1 main app. For now I think it’s an overkill for what I’m trying to do, and would just like to incorporate it in a few “strategic” pages. Any recommendations? For now I am thinking using different application.js files to accomplish this. For example, dashboard_application.js, user_mgmt_application.js, where each contains import for models/controllers/routers necessary for the different “apps”. What do you think?
+1 to the question. And a small addition to it - if there is a good approach to do what @gniquil wants to do than it would be possible to mix backbone.js and ember.js on different pages the same way in same rails app, right?
From my experience with ember rails this isn’t something that’s currently implemented. One of the issues is that ember-rails doesn’t some really nice things out of the box such as putting all your handlebars templates together.
One of the things that makes ember so daunting is that it’s “A framework for building ambitious web applications”. It’s not really designed to add little applets throughout an application. It’s designed to be the application. As a result it seems that doing what your asking isn’t trivial.
In short I don’t know of a “proper” way to do this. I think there are ways to achieve what you want from what I’ve seen they seem super hacky. It may be worth reframing the problem. In the end you may start adding more of these pages with dynamic content and if all goes well you’ll end up with a app with multiple ember apps all mostly running the same thing. It may be worth writing both pages using a single ember app in the hope that it’s going to continue growing.