I have created a rails application and plan on using ember to implement a piece of it. Basically I want one route to link with an ember application, while other pages are traditional rails. However, it seems that by default ember inserts an ember template into the body tag on every single page, while I only want this to happen on one particular page.
For example, I want the route '/ember' to be a ember application, where application.hbs is rendered. Any other route is handled by rails a normal, and ember does not insert a template within the page.
How can I make sure this is the case?
I have a similar setup, only I have my ember app attaching to a particular element, but it wouldn't be that big of a change. The trick is to deferReadiness, which tells ember to not start until you tell it to. So add something unique to the page that should have the ember app, and exclude it from the other pages, if it doesn't exist deferReadiness.
window.App = App = Ember.Application.create({
rootElement: '#ember-container'
});
// AKA don't start the app cause aint nothing to hook up to
if($('#ember-container').length==0){
App.deferReadiness();
}