L. Preston Sego III
11d8fee4d0
added docs for setting up ember for nested resources with the json api adapter
...
fix typo
fix intra-document links
fix spelling error in nested resources toc link
add example for post collection
Update ember-and-json-api.md
fix typo
2015-10-30 13:25:08 -04:00
Lucas Hosseini
68a751744e
Update schema.md
2015-10-26 09:07:37 +01:00
Benjamin Fleischer
14e84640c1
Try to improve readability on github [ci skip]
2015-10-26 01:27:04 -05:00
Benjamin Fleischer
15c296d643
Table formatting? [ci skip]
2015-10-26 01:27:00 -05:00
Benjamin Fleischer
cf34a66527
Mapping JSON API spec / schema to AMS [ci skip]
2015-10-26 01:18:34 -05:00
Benjamin Fleischer
9b0c86546b
Merge pull request #1253 from rails-api/architecture
...
Describe AMS architecture in the big picture
2015-10-22 10:37:46 -05:00
Benjamin Fleischer
8e1245a5b2
Merge pull request #1251 from bf4/collection_serializer
...
Rename ArraySerializer to CollectionSerializer for clarity
2015-10-22 10:29:02 -05:00
Lucas Hosseini
d3a8006562
Wording and typos.
2015-10-22 04:02:51 +02:00
Benjamin Fleischer
2c8b9b796d
Rename ArraySerializer to CollectionSerializer for clarity
2015-10-21 16:53:26 -05:00
Benjamin Fleischer
a5defcb0aa
Describe AMS architecture in the big picture [ci skip]
2015-10-21 16:19:00 -05:00
Filippos Vasilakis
91d6215ac4
Update add_pagination_links.md
2015-10-20 14:26:03 +02:00
Benjamin Fleischer
200625fd02
Add image from commit strip [ci skip]
...
http://www.commitstrip.com/en/2014/05/07/the-truth-behind-open-source-apps/
2015-10-14 17:41:15 -05:00
Lucas Hosseini
9147469842
Extend serializer lookup to the parent serializer.
2015-10-08 18:23:54 +02:00
Benjamin Fleischer
9d7da8afc4
Add support for top level jsonapi member.
2015-10-01 21:22:49 -05:00
Benjamin Fleischer
c6f8d0f5f2
Rename FlattenJson to Attributes (allow plural adapter names)
2015-09-18 10:17:02 -05:00
Benjamin Fleischer
0091be89f8
Consistently refer to the 'JSON API' and the 'JsonApi' adapter
2015-09-17 15:22:28 -05:00
Terminator3
173f21d942
outside controller use tutorial
2015-09-15 15:55:35 -05:00
Bruno Bacarini
9aa237adc2
Fix Markdown to adapters documentation
2015-09-13 21:16:50 -03:00
Lucas Hosseini
ce7a839f3d
Extended format for JSONAPI include option.
2015-09-13 22:45:47 +02:00
Benjamin Fleischer
363345b8dd
Rename Adapter.get to Adapter.lookup
...
Per https://github.com/rails-api/active_model_serializers/pull/1017#discussion_r39003855
comment by sandstrom in discussion of the inherited hook
> I'm thinking that it would be better to register adapters manually, without using the hook, i.e.
> have people call ActiveModel::Serializer::Adapter.register directly (perhaps in an initializer).
> Possibly, some inspiration can be taken from how ActiveJob adapters are wired[1].
> [1] a11571cec3/activejob/lib/active_job/queue_adapter.rb (L52-L56)
2015-09-09 08:55:20 -05:00
Benjamin Fleischer
d9e76c29d5
Make Adapters registerable so they are not namespace-constrained
...
Changes:
- Introduce Adapter::get for use by Serializer.adapter
- Move Adapter-finding logic from Adapter::adapter_class into Adapter::get
Introduced interfaces:
- non-inherited methods
```ruby
ActiveModel::Serializer::Adapter.adapter_map # a Hash<adapter_name, adapter_class>
ActiveModel::Serializer::Adapter.adapters # an Array<adapter_name>
ActiveModel::Serializer::Adapter.register(name, klass) # adds an adapter to the adapter_map
ActiveModel::Serializer::Adapter.get(name_or_klass) # raises Argument error when adapter not found
```
- Automatically register adapters when subclassing
```ruby
def self.inherited(subclass)
ActiveModel::Serializer::Adapter.register(subclass.to_s.demodulize, subclass)
end
```
- Preserves subclass method `::adapter_class(adapter)`
```ruby
def self.adapter_class(adapter)
ActiveModel::Serializer::Adapter.get(adapter)
end
```
- Serializer.adapter now uses `Adapter.get(config.adapter)` rather than have duplicate logic
2015-09-08 22:59:36 -05:00
Lucas Hosseini
bac812f907
Add documentation about configuration options.
2015-08-28 20:01:56 +02:00
Bruno Bacarini
b73ffe25c8
add kaminari and will_paginate examples
2015-08-20 11:31:21 -03:00
Bruno Bacarini
f85027e631
add more documentation to pagination links
2015-08-19 11:09:47 -03:00
Bruno Bacarini
2c2f948fa0
Add pagination links automatically
...
Pagination links will be included in your response automatically as long
as the resource is paginated using Kaminari or WillPaginate
and if you are using a JSON-API adapter. The others adapters does not have this feature.
2015-08-18 19:04:04 -03:00
Bruno Bacarini
a41d90cce4
add self to pagination links
2015-08-18 19:04:04 -03:00
Bruno Bacarini
7be25fef14
include query_parameters on pagination links as well
2015-08-18 19:04:03 -03:00
Bruno Bacarini
e62a7d6f34
return complete URIs on pagination links
2015-08-18 19:04:03 -03:00
Bruno Bacarini
acb6545c50
add documentation to pagination feature
2015-08-18 19:04:03 -03:00
T.J. Schuck
b6b3aa5f21
Fix some invalid JSON
2015-08-12 11:53:46 -04:00
João M. D. Moura
63436c73e8
minor updates and TYPOs
2015-07-16 23:29:03 -04:00
João Moura
456f9158ca
removing useless exmaple lines
2015-07-16 10:18:04 -04:00
João Moura
420f7959c0
creating initial general and how to docs
2015-07-16 10:18:04 -04:00
João Moura
b0a2e9f5e2
starting initial docs structure
2015-07-16 10:18:04 -04:00