0
votes

My Ember CLI app is using Ember 1.10.0 and Ember Data 1.0.0-beta.15. It's also running inside a Rails app via the ember-cli-rails gem.

I have various models with hasMany associations, all of which are marked async: true.

In development, when these associations are needed, the app fires a query to the API to fetch the hasMany records. Looking at Ember Inspector, the association is a DS.PromiseManyArray.

In production, no query is fired, and the association is a DS.ManyArray. Since my API sends an array of ids for the associated objects, the DS.ManyArray has the correct number of items in it, but the record properties other than id never load.

The only difference between my development and production environment settings in config/environment.js is the API endpoint, and some logging is turned on in development. The same DS.ActiveModelAdapter is used for all environments.

Any ideas about why this behavior would be altered in production?

1

1 Answers

0
votes

It turns out that this issue was the result of having precompiled assets committed to the project repo. As a result, the ruby buildpack was skipping asset compilation, resulting in an older version of assets supporting the production instance.

The solution was to delete public/assets from the Rails app and re-deploy to Heroku.