I am using the ember-rails gem. I made a route in my rails application called /status which returns a bunch of json. I then created a route in ember called status (/#/status). I was wondering how I can create a ember controller that gets the json from /status and displays it in the template?
Sorry, im a total newb and I have no idea how to make the api call.
When I use Ember.$.ajax, which is probably more analogous to your getJSON, my url is just api/status. I think if you set the baseURL you don’t need to reference it because it assumes it’s the base of the URL. I would try just removing the config.api.baseURL part and see what happens.
If I try running that handlebars file, it doenst work. It just turns up empty (no errors in the console).
Any ideas what is happening? I verified that ember is receiving the json correctly. If I do something like {{model.result.matchmaking.search_seconds_avg}}, it returns 62…
Hi,
if your app is public and you can link the repo maybe we can test it.
For personal experience, I can say that ember-inspector is a great tool for debugging.
In your case, I’ll see if the model is loaded or not.
Its a rails application so you would have to install ruby, and rails, and then cd into the folder and run bundle install. Then you would have to create a pg database called counterstrike_development and run rake db:migrate. Finally run rails server and it should work.
Thanks.
EDIT: The ember app is in /app/assets/javascripts/