Commit Graph

160 Commits

Author SHA1 Message Date
Patsy Issa
714c620ea2 Updated to use the proper renderer 2016-08-22 12:32:22 +03:00
Benjamin Fleischer
26bcdbe44a Clean up docs 2016-08-17 16:16:13 -05:00
Benjamin Fleischer
a0dd5e58cc Merge branch 'xn-patch-1' 2016-08-17 16:13:37 -05:00
L. Preston Sego III
6de3f31b6e Namespace separator setting for json-api and tests (#1874)
Adds jsonapi_namespace_separator configuration

Also:

* Enable getting type from record class without serializer

Needs Followup:

- https://github.com/rails-api/active_model_serializers/pull/1874#discussion_r74607042 
- https://github.com/rails-api/active_model_serializers/pull/1874#discussion_r74607734
2016-08-12 12:54:42 -05:00
Benjamin Fleischer
9217bc2ec4 Merge pull request #1844 from bkoltai/bk_upgrade_0_8_to_0_10_doc
Add documentation on upgrading from `0.8` to `0.10` safely
2016-08-08 20:54:34 -05:00
Edward Andrews-Hodgson
be8f136d15 Add warning in caching documentation 2016-08-04 17:17:00 +01:00
Leo Correa
6567989ad7 Specify how to get the instance of the serializer (#1861)
[DOC] `SerializableResource#serializer` vs. `SerializableResource#serializer_instance` [ci skip]
2016-07-27 13:59:12 -05:00
bluehallu
4ff33a7ad1 Fix typo (#1855) 2016-07-24 15:49:38 -04:00
bkoltai
d9ba5cd768 Fix typos and make examples more explicit 2016-07-20 21:07:06 -07:00
Nirmalya Ghosh
37a17723cf Modified some code and removed unnecessary code from the ember and json api doc (#1852)
* modified some code and removed unnecessary code from the ember abd json api doc

* using es6 imports
2016-07-20 10:19:59 -04:00
bkoltai
5e72ec4be7 Fix small typo 2016-07-13 10:12:41 -07:00
bkoltai
e966d07b2c PR comments
- Add list of breaking changes
- Add `true` param to `responds_to?` calls in overriden `try`
2016-07-13 10:11:19 -07:00
bkoltai
3ecc3ed0c1 Add documentation on upgrading from 0.8 to 0.10 safely 2016-07-13 09:48:07 -07:00
Yogesh Khater
156dc232ce Add doc for setting conditional serialization_scope 2016-06-30 17:14:58 +05:30
Benjamin Fleischer
c029c00758 Merge pull request #1802 from kyleshevlin/update_integrations_ember_and_json_api
update integration documentation for ember and JSONAPI to include…
2016-06-26 22:26:08 -05:00
Francisco Quintero
e8f0dc787e Add note about will_paginate previous_page method (#1801)
* Add note about will_paginate previous_page method

Pagination_dict method in JSON adapter section refers only to kaminari prev_page. Newer version of will_paginate uses previous_page method.

* move annotation for will_paginate's previous_page method to inline comment in example methods definition
2016-06-26 22:17:21 -05:00
Luiz Eduardo Kowalski
d27b21a733 Add docs for the fields option 2016-06-24 07:09:21 +02:00
Christian Trosclair
3d48a2fbf7 Create grape integration documentation. 2016-06-22 22:38:48 -05:00
Kyle Shevlin
4f508a88c9 remove mime type registration, adjust key_transform advice 2016-06-14 22:05:54 -07:00
Scott Kobewka
43b6bae7fe Fixing typo in Serializers guide for including a block after 2016-06-14 14:27:23 -04:00
Kyle Shevlin
8df5b045f2 update integration documentation for ember and JSONAPI to include key_transform underscores to match the attribute and relationship underscore transformations 2016-06-13 22:54:27 -07:00
Benjamin Fleischer
5017bb7f2e Fix spelling
```
cat <<  'EOF' > .git/hooks/pre-push

bundle exec rake rubocop

if command -v misspell >/dev/null; then
  misspell  -w -error -source=text {app,config,lib,spec,test,docs,bin}/**/* 2>/dev/null
fi

EOF
chmod +x .git/hooks/pre-push
```
2016-06-09 03:41:01 -05:00
Spencer Oberstadt
998ca55e3d Fix docs for deserialization (#1768)
I found in the tests that deserialization expects relationships to be under a `relationships` key.
https://github.com/rails-api/active_model_serializers/blob/master/test/action_controller/json_api/deserialization_test.rb#L68
2016-06-01 16:50:15 -04:00
Yohan Robert
b8af2892f7 [skip ci] Fix root key documentation (#1761)
The current documentation stated that it was not possible to override
the root key for the JSON adapter. This was removed from the
documentation and it now links the useful documentation pages.
2016-05-31 13:30:47 -06:00
Lucas Hosseini
f48fd2a327 Extract IncludeTree. (#1685) 2016-05-28 10:07:11 -04:00
Ben Mills
f2cb497fe3 Add key transform performance note to docs (#1753) 2016-05-26 16:19:19 -04:00
Ben Woosley
8c18d18cdb Add default_includes configuration
This is useful to set application-wide default behavior - e.g. in
previous versions of AMS the default behavior was to serialize the
full object graph by default - equivalent to the '**' include tree.

Currently just the global setting, but I think this could also work
on a per-serializer basis, with more attention.
2016-05-26 00:16:14 +00:00
André Aubin
efdee6041b Adding documentation on conditional attributes
Adding documentation and short example ([from this pull request](https://github.com/rails-api/active_model_serializers/pull/1403)) on conditional attributes.

Adding lambda literal notation and example.

Adding lambda literal notation and example, and fixing typo.

Removing PR reminder

Adding Changelog entry

Moving CHANGELOG entry under master (unreleased)

Use option instead of parameter
2016-05-20 00:47:53 +02:00
cgmckeever
ec15fa9de3 Adds documentation for overriding default serializer based on conditions (#1730)
suggested changes

update changelog
2016-05-17 15:28:54 -04:00
cgmckeever
bbed12864d adds polymorphic option to association definition which includes association type in serializer
regen gemlock

regen gemlock

better variable naming

rubocop fixes

adds to changelog

adds empty relationship and has_many polymorph tests

indent

test cleaning

-rubocop

rubocop

rubocop

rubocop

changelog

remove silly .DS

fix roque failure

fix
2016-05-17 12:30:59 -05:00
Fumiaki MATSUSHIMA
aa087a22b5 String/Lambda support for conditional attributes/associations 2016-04-26 21:37:25 +09:00
Christopher Styles
ad9e69a737 Fix typo in PRIMITIVE HANDLING docs [ci skip] 2016-04-25 20:02:36 -07:00
Lucas Hosseini
4c0e2dcb28 Fix example in docs/general/deserialization.md. 2016-04-18 01:04:50 +02:00
Michał Zając
dcc7af925d Update serializers.md 2016-04-11 14:52:07 +02:00
Benjamin Fleischer
afe3c93807 Add more association documentation (#1635)
[DOC] Add more association documentation
2016-04-10 12:44:37 -05:00
Caleb Sayre
05618eac3d added howto for serializing poro
trying to get styling correct

added changelog entry, link to guide, and fixed indentation
2016-04-09 17:20:46 -04:00
Ben Mills
3498647d1a Apply key transforms to keys referenced in values 2016-04-04 10:16:04 -06:00
Chris Peters
dba85f2720 #1594 - Document generator's auto-extending of (if it exists) 2016-04-02 13:18:07 -04:00
Krzysztof Rybka
37e0fdb0ee Remove wrong quoting in serializers guide 2016-03-31 14:56:07 +02:00
Benjamin Fleischer
fa7b3afbfd Prefer explicitly yielding the serializer, per groyoh 2016-03-30 14:01:28 -05:00
Arti Sinani
9e2edded7c architecture doc fix 2016-03-30 14:18:27 +01:00
Yohan Robert
21cb896802 Move SerializableResource to ActiveModelSerializers namespace
Ref. https://github.com/rails-api/active_model_serializers/pull/1310
2016-03-30 11:33:04 +02:00
Ben Mills
bfff46b66e Add output examples to Adapters docs 2016-03-17 14:07:32 -06:00
Jeffrey Wan
297e1f7e9d Update docs regarding overriding the root key 2016-03-17 10:54:22 -06:00
L. Preston Sego III
88d4fe5b5e Merge pull request #1431 from beauby/deserialization-docs
Add docs for deserialization.
2016-03-17 12:48:55 -04:00
L. Preston Sego III
586ff09cc5 Added more detailed examples to deserialization.md from json_api/deserialization.rb 2016-03-17 07:58:51 -04:00
Ben Mills
9e992358d8 Merge pull request #1574 from remear/key-casing
Provide key transformation
2016-03-15 13:42:24 -06:00
Marc Garreau
045fa9bc07 Adds polymorphic tests and documentation 2016-03-15 13:09:59 -06:00
Ben Mills
c533d1a7fe Provide key case translation 2016-03-15 12:21:10 -06:00
Krzysztof Rybka
7c3f0ec6af Remove wrong quoting in serializers guide 2016-03-14 15:00:46 +01:00