Commit Graph

397 Commits

Author SHA1 Message Date
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
59ae84baba exchange to a faster regex to get origina_url 2015-08-18 19:04:03 -03:00
Bruno Bacarini
77a8f66ad8 fix message on raise of pagination links class 2015-08-18 19:04:03 -03:00
Bruno Bacarini
e0d050d2af remove resource and options attr_reader from array_serialize 2015-08-18 19:04:03 -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
36c452e60b add pagination feature to changelog file 2015-08-18 19:04:03 -03:00
Bruno Bacarini
acb6545c50 add documentation to pagination feature 2015-08-18 19:04:03 -03:00
Bruno Bacarini
331218d1c3 add test to class of pagination links 2015-08-18 19:04:03 -03:00
Bruno Bacarini
e040d6fcce add action test to pagination links 2015-08-18 19:04:02 -03:00
Bruno Bacarini
1fe8b06986 exchange pagination class to inside json_api scope 2015-08-18 19:04:02 -03:00
Bruno Bacarini
b864302695 remove 'page object' on paginations links' 2015-08-18 19:04:02 -03:00
Bruno Bacarini
f7c77c1256 add feature to include pagination links in response 2015-08-18 19:04:02 -03:00
João Moura
e384b65f5d Merge pull request #1048 from bf4/cleanup_meta_in_adapter
Let FlattenJson adapter decide it doesn't include meta
2015-08-18 16:23:03 -03:00
Benjamin Fleischer
98d009a000 Let FlattenJson adapter decide it doesn't include meta 2015-08-18 15:13:21 -04:00
João Moura
e7d3323d23 Merge pull request #1060 from developertown/fragment-cache-namespaces
Update fragment cache to support namespaced objects
2015-08-18 00:02:49 -03:00
Aaron Lerch
35c8f0d835 Update fragment cache to support namespaced objects 2015-08-17 17:12:30 -04:00
João Moura
6aba260491 Merge pull request #1052 from whatthewhat/underscored-json-root
Use underscored json_root when serializing a collection
2015-08-17 01:12:22 -03:00
Mikhail Topolskiy
e8e4bdefd2 Use underscored json_root 2015-08-13 20:31:48 +03:00
João Moura
8568ed5913 Merge pull request #1051 from tjschuck/patch-1
Fix some invalid JSON in docs
2015-08-13 01:05:39 -03:00
T.J. Schuck
b6b3aa5f21 Fix some invalid JSON 2015-08-12 11:53:46 -04:00
João Moura
b4949fbc2a Merge pull request #1049 from bf4/fix_json_api_adapter_serialable_hash
Fix incorrect s/options = {}/options ||= {}
2015-08-12 11:08:39 -03:00
João Moura
a3d75c9354 Merge pull request #1037 from engineyard/type-attribute
allow for type attribute
2015-08-12 02:55:51 -03:00
Benjamin Fleischer
43e09c03de Fix incorrect s/options = {}/options ||= {}
Introduced in #965, surfaced in #1041
2015-08-11 17:08:09 -05:00
Josh Lane
033ce8e88d allow for a type attribute
* "namespace" json_api specific type method
2015-08-11 08:33:05 -07:00
Josh Lane
4af98852b8 fix warning
* don't overshadow serializer variable
2015-08-11 08:32:20 -07:00
João Moura
f7a1585b75 Merge pull request #1034 from engineyard/id-attribute
allow id attribute to be overriden
2015-08-11 02:02:07 -03:00
João Moura
03ddeeeec1 Merge pull request #1035 from artLopez/master
Fixed Comments highlight
2015-08-05 20:24:17 -03:00
artLopez
b68305f560 Fixed Comments highlight 2015-08-04 12:00:53 -07:00
Josh Lane
f6e3d4e1f9 allow id attribute to be overriden 2015-08-04 09:22:05 -07:00
João Moura
c4af610ed2 Merge pull request #1031 from bolshakov/feature/disaplow_to_define_multiple_associations_at_once
Disallow to define multiple associations at once
2015-08-01 18:22:00 -03:00
João Moura
9ace77e655 Merge pull request #1032 from elliotlarson/master
Wrap railtie requirement with rescue
2015-08-01 17:22:12 -03:00
elliotlarson
b99a6350cc only require railtie if Rails is present 2015-07-31 12:51:57 -07:00
Артём Большаков
424a053ee5 Disallow to define multiple associations at once 2015-07-31 19:15:56 +03:00
João Moura
728b8f980e Merge pull request #1026 from jfelchner/patch-1
Bump Version Number to 0.10.0.rc2
2015-07-31 11:34:42 -03:00
João Moura
c703d0f35c Merge pull request #985 from bolshakov/feature/each_association
Associations implementation refactoring
2015-07-31 10:57:03 -03:00
Jeff Felchner
e468030cbf Bump Version Number to 0.10.0.rc2
Due to the fact that users need to switch from the released version to `master` occasionally to pull in upstream bugfixes, it's important that this version number stays in sync with the released version.
2015-07-31 04:51:55 -05:00
João M. D. Moura
88eabdf6ac fixing tests by using a Profile intance to avoid unrelated warning 2015-07-31 03:28:50 -03:00
João Moura
b78126565c Merge pull request #954 from bf4/encapsulate_serialization
Encapsulate serialization in ActiveModel::SerializableResource
2015-07-31 03:09:58 -03:00
João Moura
7bc16666fe Merge pull request #972 from bf4/capture_app_warnings
Capture app warnings on test run
2015-07-30 22:24:08 -03:00
Артём Большаков
2952a332e0 Associations refactoring
* Move all associations related code from Serializer class to Associations module
* Introduce Reflection class hierarchy
* Introduce Association class
* Rid off Serializer#each_association
* Introduce Serializer#associations enumerator
2015-07-30 11:20:29 +03:00
João Moura
438d8f411a Merge pull request #1019 from baojjeu/master
Improve README.md
2015-07-28 21:32:01 -03:00
Baozi Wu
672618447e Update README.md 2015-07-27 02:44:53 +08:00
Baozi Wu
e388be9c01 Update README.md 2015-07-26 16:01:52 +08:00
Benjamin Fleischer
df140293d3 Remove unused controller rescue_with_handler
Per
https://github.com/rails-api/active_model_serializers/pull/954#discussion_r32589882

Ref 917, 918
2015-07-23 11:06:11 -05:00
Benjamin Fleischer
a66df3009a Encapsulate serialization in ActiveModel::SerializableResource
Usage: ActiveModel::SerializableResource.serialize(resource, options)
2015-07-23 11:05:23 -05:00
João Moura
e1c25e86e3 Merge pull request #998 from joaomdmoura/changing_root_to_model_class_name
Changing root to model class name
2015-07-23 02:18:47 -04:00
João Moura
9817a5b595 updating tests 2015-07-23 02:11:34 -04:00
João Moura
418721302b defining json_key(root) as model class name 2015-07-23 02:11:34 -04:00