Commit Graph

1608 Commits

Author SHA1 Message Date
Alexandre de Oliveira
95d122046d Merge pull request #692 from ggordon/linked_for_jsonapi_collection
Include 'linked' member for json-api collections
2014-11-04 21:59:15 -02:00
Carlos Antonio da Silva
8374396b88 Merge pull request #714 from ride/to-json-as-json
Define as_json instead of to_json
2014-11-03 22:00:36 -02:00
Guillermo Iguaran
f5411f045f Define as_json instead of to_json 2014-11-03 17:38:58 -05:00
Gary Gordon
d5bae0c2f0 Include 'linked' member for json-api collections
The options passed to the render are partitioned into adapter options
and serializer options. 'include' and 'root' are sent to the adapter,
not sure what options would go directly to serializer, but leaving this
in until I understand that better.
2014-11-03 17:13:55 -05:00
Alexandre de Oliveira
80ece39dd9 Merge pull request #710 from ride/fix-empty-linked
JSON-API: Don't include linked section if associations are empty
2014-11-02 01:53:37 -02:00
Alexandre de Oliveira
deaf55eeae Merge pull request #711 from rails-api/fixes-rbx-on-travis
Fixes rbx gems bundling on TravisCI
2014-11-02 01:51:14 -02:00
Alexandre de Oliveira
3504c1a5d8 Fixes rbx gems bundling on TravisCI 2014-11-02 01:23:29 -02:00
Guillermo Iguaran
3bba334cf8 JSON-API: Don't include linked section if associations are empty 2014-10-31 14:30:59 -05:00
Alexandre de Oliveira
5acd0be287 Merge pull request #709 from ride/add-type
Add type key when association name is different than object type
2014-10-31 15:03:32 -02:00
Guillermo Iguaran
2d21a8e83f Add type when association name is different than objects type 2014-10-31 01:54:13 -05:00
Alexandre de Oliveira
462efc0ea5 Merge pull request #708 from ride/fix-for-nil-associations
Handle correctly null associations
2014-10-31 00:53:47 -02:00
Guillermo Iguaran
19ac139880 Handle correctly null associations
null belongs_to associations are now serialized as nil instead
of raise an error during serialization.
2014-10-30 09:35:05 -05:00
Alexandre de Oliveira
baf3db1365 Merge pull request #691 from jacob-s-son/fix-embed-option-for-associations
Fix embed option for associations
2014-10-29 18:41:59 -02:00
Alexandre de Oliveira
617756623c Merge pull request #689 from ride/fix-json-api-custom-root
Fix support for custom root in JSON-API adapter
2014-10-29 15:06:13 -02:00
Aaron Renoir
be54e0bc4f remove serializer dependency from fieldset 2014-10-27 15:24:19 -07:00
Aaron Renoir
34f08477e4 fix tests, but need to understand how the serializer class attribute _associations was getting changed. 2014-10-26 14:41:14 -07:00
Aaron Renoir
39bee48ae6 implement sparse fieldsets http://jsonapi.org/format/#fetching-sparse-fieldsets 2014-10-26 13:04:14 -07:00
Edgars Jekabsons
f9b7c74235 Renamed embed test to have "test" suffix
Fixed reference to association options
2014-10-22 15:30:44 +03:00
Guillermo Iguaran
5f198667be Fix support for custom root in JSON-API adapter 2014-10-22 04:01:12 -03:00
Steve Klabnik
47deb87e81 Merge pull request #685 from ride/ids-as-strings-2
Serialize ids as strings in JSON-API adapter
2014-10-20 11:22:09 -04:00
Guillermo Iguaran
7c030314cb Serialize ids as strings in JSON-API adapter 2014-10-15 18:56:49 -05:00
Steve Klabnik
9360a10ce2 Merge pull request #684 from ride/array-serializer
Refactor adapters to implement support for array serialization
2014-10-15 19:39:50 -04:00
Guillermo Iguaran
557b56a50e Refactor adapters to implement support for array serialization 2014-10-15 17:35:50 -05:00
Steve Klabnik
efea975419 Merge pull request #682 from ride/json-api-root
Include root by default in JSON-API serializers
2014-10-14 14:19:32 -04:00
Guillermo Iguaran
b91a86b401 Add test for serialization for adapters with root by default 2014-10-14 12:42:21 -05:00
Guillermo Iguaran
3fa1116035 Include root by default in JSON-API serializers 2014-10-14 11:33:06 -05:00
Steve Klabnik
099f773a65 Merge pull request #625 from JordanFaust/feature/url-dsl
Add DSL for urls
2014-10-14 11:47:14 -04:00
Steve Klabnik
410eacc30e Merge pull request #677 from ride/embed-ids-option
Add support for embed: :ids option for in associations
2014-10-14 11:39:09 -04:00
Steve Klabnik
341cca7d8a Merge pull request #681 from quainjn/inherited-serializer
Check superclasses for Serializers
2014-10-14 11:36:02 -04:00
Steve Klabnik
9d344b1dd7 Merge pull request #680 from NullVoxPopuli/add-root-option
Add support for root keys
2014-10-14 04:06:50 -04:00
Jake Quain
c0166f3026 Check superclasses for Serializers 2014-10-13 17:39:54 -06:00
NullVoxPopuli
7338b62b02 add support for root keys
remove debugging gem

fix white space
2014-10-13 13:27:09 -04:00
Guillermo Iguaran
188336522f Add support for embed: :ids option for in associations 2014-10-10 16:48:55 -05:00
Steve Klabnik
97023db904 Merge pull request #675 from tricknotes/support-rails4.2
Support Rails 4.2.0
2014-10-09 12:39:07 -04:00
Ryunosuke SATO
4fe9790bfa Support Rails 4.2.0
This patch is the same fixes as #655 and #663 .
2014-10-10 00:52:59 +09:00
Steve Klabnik
c5294086ea Merge pull request #667 from ride/require-only-activemodel
Require only activemodel instead of full rails
2014-09-29 18:23:47 -04:00
Guillermo Iguaran
771e9edccb Require only activemodel instead of full rails 2014-09-29 15:46:57 -05:00
Steve Klabnik
6ab0cf3a4f Merge pull request #653 from alexgenco/test_path_fix
Add "_test" suffix to JsonApi::HasManyTest filename.
2014-09-20 17:45:29 -04:00
Alex Genco
0eed2b051a Add "_test" suffix to JsonApi::HasManyTest filename.
"rake test" was previously skipping this file because it didn't have the
proper suffix.
2014-09-14 13:02:09 -07:00
Steve Klabnik
325dc3a812 Merge pull request #631 from craiglittle/fix-build-badge
Update build badge URL
2014-09-03 12:08:00 -04:00
Craig Little
76ce2130e7 Update build badge URL
s/steveklabnik/rails-api/
2014-09-03 00:43:58 -07:00
Jordan Faust
ad0859e262 Add DSL for urls 2014-09-01 13:44:22 -05:00
Steve Klabnik
98a3e5696e Merge pull request #612 from bolshakov/feature/adapter
Feature/adapter
2014-08-31 19:58:25 -04:00
Tema Bolshakov and Dmitry Myaskovskiy
71a43a432a Pass options to associations 2014-08-29 20:16:11 +04:00
Tema Bolshakov and Dmitry Myaskovskiy
258b5953e2 clean up code 2014-08-29 19:47:46 +04:00
Tema Bolshakov and Dmitry Myaskovskiy
45a47a1c4d safe_constantize instead of rescue 2014-08-29 19:47:29 +04:00
Tema Bolshakov and Dmitry Myaskovskiy
ff37b6260d test for json adapter 2014-08-29 19:40:01 +04:00
Tema Bolshakov
7293072670 Revert "Remove 1.9.3 from CI build as we dropped support"
This reverts commit 85b4b85bb3.
2014-08-29 13:48:39 +04:00
Tema Bolshakov
77847d7c02 User String#constantize instead of Object.const_get 2014-08-29 13:48:06 +04:00
Tema Bolshakov
139609355f Object.const_get differs on 2.0 and 2.1.2. So rescue from NameError 2014-08-29 13:01:01 +04:00