Skip to content

Commit

Permalink
Merge pull request #3540 from gabriel-letarte/gabriel-letarte-patch-1
Browse files Browse the repository at this point in the history
[DOC release] Update store.js, additionnal doc
  • Loading branch information
bmac committed Jul 17, 2015
2 parents 1bea9b7 + b151c50 commit 0be4bd3
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions packages/ember-data/lib/system/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -938,26 +938,36 @@ Store = Service.extend({
language for all server-side queries, and then require all adapters to
implement them.
---
If you do something like this:
```javascript
store.query('person', { page: 1 });
```
The call made to the server, using a Rails backend, will look something like this:
```
Started GET "/api/v1/person?page=1"
Processing by Api::V1::PersonsController#index as HTML
Parameters: {"page"=>"1"}
Parameters: { "page"=>"1" }
```
---
If you do something like this:
```javascript
store.query('person', {ids: [1, 2, 3]});
store.query('person', { ids: [1, 2, 3] });
```
The call to the server, using a Rails backend, will look something like this:
```
Started GET "/api/v1/person?ids%5B%5D=1&ids%5B%5D=2&ids%5B%5D=3"
Processing by Api::V1::PersonsController#index as HTML
Parameters: {"ids"=>["1", "2", "3"]}
Parameters: { "ids" => ["1", "2", "3"] }
```
This method returns a promise, which is resolved with a `RecordArray`
Expand Down

0 comments on commit 0be4bd3

Please sign in to comment.