Questions tagged [ember-model]

Ember Model (EM) is a simple and lightweight model library for Ember.

Ember Model (EM) is a simple and lightweight model library for Ember. It intentionally supports a limited feature set. The main goal is to provide primitives on top of $.ajax that are required by Ember.

EM is still very much a work in progress, but it's flexible enough to be used in apps today. It was extracted out of an Ember app. Please see the issues section for a list of bugs and planned features.

Github repository

135 questions
2
votes
3 answers

Right way to make AJAX GET and POST calls in EmberJS

I've started working on EmberJS and I absolutely love it. It does have a learning curve but I believe it has fundamentally very meaningful principles. My questions is how to make GET and POST calls in Ember JS. I understand that there are models /…
Prakash Raman
  • 13,319
  • 27
  • 82
  • 132
2
votes
1 answer

Ember Data mix of find(), query(), findAll()

If I do this.get('store').findAll('model') It will make a request to /models and it will expect for an array. On the other hand, if I do this.get('store').find('model', my_id) It will make a request to /models/my_id and it will expect for one…
renno
  • 2,659
  • 2
  • 27
  • 58
2
votes
1 answer

How can I serialize a Simple array payload in ember?

I am pretty new to Ember. I have a service which returns a simple array like [ "abc", "bcd", "cde", "def", "efg" ] My model is somewhat like this import Model from 'ember-data/model'; import attr from 'ember-data/attr'; export default…
sree
  • 543
  • 6
  • 21
2
votes
4 answers

Ember.js not updating model

FINAL UPDATE: Kalman Hazins pointed me in the right direction, the computed property wasn't being called because of the fact that it wasn't rendered onscreen, so it wasn't "necessary" to re-compute it. I'll include here the final code for the…
goffreder
  • 503
  • 3
  • 17
2
votes
1 answer

Ember.js ebryn/ember-model differences between Model.find() and Model.fetch()

Good Morning, why there are two methods, who returning the almost the same result. I know "only", that the method Method.fetch() returns a promise. What is the main difference between this two methods?
user2521436
  • 299
  • 1
  • 5
  • 15
2
votes
1 answer

ember-model example application

I'm looking for an example application using ember-model (https://github.com/ebryn/ember-model) I'm looking for an example that: Showcases both object fetching and creation, Showcases writing of a custom adapter, Has complete sources available I…
julx
  • 8,694
  • 6
  • 47
  • 86
2
votes
2 answers

ember-model: how to force a record to re-GET from the server?

With the following queries exposed by my back end: GET /api/foos returns a list of all Foos, suitable for display within a master list GET /api/foos/:foo_id returns a single Foo, with more detailed information, suitable for display within a…
bguiz
  • 27,371
  • 47
  • 154
  • 243
2
votes
1 answer

How can I use an external url in ember-model

This may seem like a simple question, but how can I use an external URL with Ember-model? All of the examples just assume the same domain. I would like to use e.g. apiary or firebase. https://github.com/ebryn/ember-model
Cameron A. Ellis
  • 3,833
  • 8
  • 38
  • 46
2
votes
2 answers

getting error when trying to update a model inside a ObjectController in Ember

the page load starts at when a user is viewing a user's profile. And he makes some action and my code does ajax call to update it's user type- App.UserController = Ember.ObjectController.extend convert: -> $.get '/api/user/convert_to_client/'…
David
  • 4,235
  • 12
  • 44
  • 52
2
votes
3 answers

How to properly add a related record

I have a collection of comments and a collection of posts. App.Router.map(function () { this.resource("posts", { path: "/posts" }); this.resource("post", { path: "/:post_id" }, function () { this.resource("comments", { …
Max
  • 246
  • 1
  • 6
2
votes
2 answers

child records and ember model

[Update] Thanks for the help so far. I've been able to create a new Post record with an embedded Comment record with static data. Via this method: App.CommentsController = Ember.ArrayController.extend({ needs: "post", …
Eric Johnson
  • 111
  • 6
2
votes
1 answer

How to use belongsTo in ember-model?

I have created FIXTURES using ember-model, but i am not able to use following node on template "logged_in": { "id" : "1", "logged": true, "username": "sac1245", "account_id": "4214" } I have implemented…
Sachin
  • 2,321
  • 11
  • 31
  • 49
2
votes
1 answer

Configuring RESTAdapter to not set the .json extension for get / list requests

I'm using a cross domain REST api. I have defined my custom REST adapter to trigg my API. Pb is to remove the ".json" automaticaly set by ember-model. How to configure my adapter to avoid setting my "replace function" (url=url.replace('.json',…
fvisticot
  • 7,936
  • 14
  • 49
  • 79
2
votes
2 answers

Getting Started with Ember-Model: Ember.Adapter subclasses must implement findAll

I've tried to follow along with the Ember cast video: http://www.embercasts.com/episodes/getting-started-with-ember-model I originally tried with the latest handlebars rc4 and ember rc6 but was receiving this error:Ember.Adapter subclasses must…
Matt Mazzola
  • 4,593
  • 4
  • 22
  • 28
2
votes
2 answers

Not able to show JSON data using Ember-Model

I have started using Ember Model, but the JSON data is not getting loaded into the view. Moreover, I am not getting errors or warnings on console. Here's my app.js, App = Ember.Application.create({}); App.IndexRoute = Ember.Route.extend({ …
John Altar
  • 141
  • 2
  • 13
1
2
3
8 9