Benjamin Fleischer
827fca098d
Bump to 0.9.4
2016-01-05 13:26:16 -06:00
Alexandre de Oliveira
dc08f0ec80
Merge pull request #748 from raphaelpereira/0-9-stable
...
Propagate serialization_options across associations
2015-03-30 16:31:41 -03:00
Anthony Dmitriyev
d62463de15
Fix issue with embedding multiple associations under the same root key
2015-03-13 17:24:54 +00:00
Alexandre de Oliveira
55210ab61f
Merge pull request #813 from jtomaszewski/feature/custom-serializer-class
...
Allow to define custom serializer for given class
2015-03-09 11:43:53 -03:00
Jacek Tomaszewski
d8b78a36cf
Allow to define custom serializer for given class
...
.. by defining #serializer_class method in serialized object's class. Resolves #515 .
2015-03-08 14:58:29 +01:00
Tony Novak
263b66e423
Fix and test for #490
2015-01-30 13:49:15 -08:00
Josh Lane
0e7cae4d6d
pass context to ArraySerializer
2015-01-27 11:37:35 -08:00
Alexandre de Oliveira
02c6ac96b0
Bump version to 0.9.3
2015-01-21 18:29:38 -02:00
Nate Berkopec
577db35824
Revert "Make sure render json: ..., each_serializer: ... is working with Enumerables"
...
This reverts commit 90343cea4d .
2015-01-13 17:12:02 -05:00
Raphael Pereira
ea6dc424ee
Propagate serialization_options across associations
2014-12-06 09:25:30 -02:00
Steve Klabnik
f1c3268a54
bump version
2014-12-04 06:54:52 -05:00
Kevin Bullaughey
edfd38bdee
converted has many to use string key for association, makeing it compatable with has_one; fixed tests that relied on symbol keys for has_many associations
2014-10-22 10:33:11 -04:00
Steve Klabnik
89f87bf855
Merge pull request #679 from Ahalogy/serializer-options
...
Serializer options
2014-10-14 11:37:47 -04:00
Steve Klabnik
4a4bcdc57b
Merge pull request #666 from jastkand/include_url_helpers
...
Auto-include url_helpers for Rails-apps. Fixes #563
2014-10-14 11:33:20 -04:00
Robin Daugherty
341d552ae0
Make sure serialization_options is never nil
2014-10-12 13:08:45 -04:00
Robin Daugherty
f385ab05fb
Make options param optional
2014-10-12 12:01:01 -04:00
Robin Daugherty
57f1c1b1f9
Fix serialization_options for array serialization
2014-10-12 02:29:50 -04:00
Robin Daugherty
d39a99d770
Add serialization_options
...
Prior to 0.9, @options was used to see the options passed to to_json. For some reason, with 0.9 the options were no longer passed and were entirely inaccessible within a Serializer.
This restores the access by placing it in an attribute named serializer_options.
2014-10-12 01:08:47 -04:00
Ryunosuke SATO
447d96923f
Support Rails 4.2.0 with AMS 0.9
...
This patch is the same fixes as #655 and #663 for 0-9-stable branch.
2014-10-10 00:53:56 +09:00
Steve Klabnik
5acd98e61b
Merge pull request #639 from gauthier-delacroix/Unsuffixed-default-associations-keys
...
Allow JSONAPI unsuffixed associations keys
2014-10-08 14:45:46 -04:00
Andrey Krivko
dce6e59772
Auto-include url_helpers for Rails-apps. Fixes #563
2014-09-29 17:16:33 +07:00
Steve Klabnik
06e3bb77f2
Merge pull request #662 from jastkand/remove-question-sign
...
Add auto-stripping of question mark for attributes
2014-09-26 10:35:43 -04:00
Andrey Krivko
bded293529
Add auto-stripping of question mark for attributes
2014-09-26 15:42:41 +07:00
Steve Klabnik
c19a254154
Merge pull request #632 from gauthier-delacroix/Default_namespace_inheritance
...
Default namespace option
2014-09-25 19:41:33 -04:00
Andrey Chernih
90343cea4d
Make sure render json: ..., each_serializer: ... is working with Enumerables
...
If you try to render Enumerable with custom `each_serializer` then it will render with default serializer instead:
```ruby
render json: sequel_scope, each_serializer: CustomSerializer
```
This commit fixes this behaviour. Most likely fixes https://github.com/rails-api/active_model_serializers/issues/664 as well
2014-09-25 16:59:47 +04:00
Steve Klabnik
ff01ba2ced
Merge pull request #647 from gauthier-delacroix/Fix-embed_in_root_key-merging
...
Fix embed_in_root_key merging
2014-09-20 17:45:45 -04:00
Gauthier Delacroix
efa22d9d44
Add plural_default_root config option
2014-09-12 18:56:51 +02:00
Gauthier Delacroix
a862929f81
Fix embed_in_root_key merging
2014-09-09 11:27:08 +02:00
Gauthier Delacroix
e273fc5854
Fix namespaced serializers reloading
2014-09-08 13:59:50 +02:00
Gauthier Delacroix
6f4f30cda6
Allow JSONAPI unsuffixed associations keys
...
As shown here :
https://github.com/json-api/json-api/blob/gh-pages/format/index.md#resource-relationships-
2014-09-05 18:46:08 +02:00
Gauthier Delacroix
5ae536cd7b
typo
2014-09-03 15:24:49 +02:00
Gauthier Delacroix
4d3d234dda
Fix default serializer option
2014-09-03 14:57:00 +02:00
Gauthier Delacroix
8514528db7
Allow default namespace inheritance
2014-09-03 12:41:30 +02:00
Steve Klabnik
922dd273c9
Merge pull request #620 from tristandunn/td-notifications
...
Avoid overwriting notifications for template assertions.
2014-08-31 20:02:08 -04:00
Steve Klabnik
d40f0d67b9
Merge pull request #617 from konukhov/namespaced_serializers-0-9
...
Namespaced serializers #499
2014-08-31 20:00:47 -04:00
Steve Klabnik
f7f5e29358
Merge pull request #601 from radanskoric/fix-nested-embed-in-root
...
Fix for nested embed_in_root when serializer used as part of an association
2014-08-31 19:57:27 -04:00
Theodore Konukhov
0292940ab4
typo
2014-08-29 19:51:32 +02:00
Theodore Konukhov
095bae31d4
fix for ruby 1.9.
2014-08-29 19:38:53 +02:00
Tristan Dunn
610aeb2e92
Avoid overwriting notifications for template assertions.
2014-08-29 08:18:44 -05:00
Theodore Konukhov
493041fdff
sync with upstream
2014-08-29 06:28:13 +02:00
Theodore Konukhov
b297f17e53
test for namespaced associations + bug fixed
2014-08-29 06:11:40 +02:00
Theodore Konukhov
dde1492934
tests for namespaced controlleler
2014-08-26 18:07:31 +02:00
Steve Klabnik
d5a993e193
Merge pull request #611 from gauthier-delacroix/Fix-0d31e72
...
Fix #0d31e72 regression
2014-08-26 11:41:03 -04:00
Gauthier Delacroix
5c4121432c
Fix #0d31e72 regression
...
0d31e72d22
2014-08-26 17:17:42 +02:00
Pol Miro
26d5fb7423
Add support to polymorphic models
2014-08-25 23:32:09 -07:00
Pol Miro
e8b983490e
Separate associations into multiple files
2014-08-25 23:32:09 -07:00
Theodore Konukhov
26c0847563
- If a controller is in a namespace, serializer will be looked up in this namespace first.
...
- Serializers for associations will be looked up in a parent serializer's namespace first too.
- "Prefix" option for different versions of associations serializers. Example: has_many :users, as: :short -> ShortUserSerializer
TODO: tests, config option for enabling namespace lookup
2014-08-24 15:57:24 +02:00
Radan Skoric
ddfd8d2c11
embed_in_root works even if serializer is invoked through another serializers' association which itself does not have embed_in_root set
2014-08-23 18:21:24 +02:00
Steve Klabnik
2fec5111ef
Bump version to 0.9.0
2014-08-22 16:17:46 -04:00
Steve Klabnik
ae7959b76e
Merge pull request #512 from TimPetricola/fix-options-access
...
Custom options are accessible in serializer
2014-08-22 16:15:41 -04:00