You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The commented out code is an example of how to setup the relationships.
283
+
The commented out code includes an example of how to setup the relationships
284
+
and define your attributes. `attr()` can be used for any valid type, or you can
285
+
specify a type, e.g. `attr('string')` or `attr('date')`. An attribute that is
286
+
defined as a `'date'` type has a built in transform method to serialize and
287
+
deserialize the date value. Typically the JSON value for a Date object is
288
+
communicated in ISO format, e.g. "2015-08-25T22:05:37.393Z". The application
289
+
serializer has methods for [de]serializing the date values between client and
290
+
server. You can add your own transform methods based on the type of the
291
+
attribute or based on the name of the attribute, the transform methods based on
292
+
the name of the attribute will be called instead of any transform methods based
293
+
on the type of the attribute.
285
294
286
295
The relationships are async using promise proxy objects. So when a template accesses
287
296
the `resource`'s relationship a request is made for the relation.
@@ -310,6 +319,8 @@ var ENV = {
310
319
};
311
320
```
312
321
322
+
`MODEL_FACTORY_INJECTIONS` may be already set to `true` in the app/app.js file.
323
+
313
324
Also, once you've generated a `resource` you can assign the URL.
314
325
315
326
See this example: [tests/dummy/app/adapters/post.js](tests/dummy/app/adapters/post.js)
@@ -342,7 +353,9 @@ as needed to act as if the API server is running on your same domain.
342
353
343
354
#### Authorization
344
355
345
-
EJR by default will pick-up credentials saved on `localStorage['AuthorizationHeader']`. If you'd like to change this, for instance to make it work with `ember-simple-auth`, there's a [configurable mixin available](https://github.com/pixelhandler/ember-jsonapi-resources/wiki/Authorization).
356
+
By default credentials stored at `localStorage['AuthorizationHeader']` will be used.
357
+
If you'd like to change this, for instance to make it work with `ember-simple-auth`,
358
+
there's a [configurable mixin available](https://github.com/pixelhandler/ember-jsonapi-resources/wiki/Authorization).
"excerpt": "The notes below demonstrate how to setup a chat application, built with [Ember CLI], that uses a backend service from [Firebase].",
12
12
"date": "2015-04-25",
13
-
"body": "## Lightning-Approach Workflow\n\nThis approach is the default setup when using ember-cli-deploy and uses a Redis\nstore for the versions of your index.html file that you deploy."
13
+
"body": "## Lightning-Approach Workflow\n\nThis approach is the default setup when using ember-cli-deploy and uses a Redis\nstore for the versions of your index.html file that you deploy.",
0 commit comments