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
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
Andrey Krivko
dce6e59772
Auto-include url_helpers for Rails-apps. Fixes #563
2014-09-29 17:16:33 +07: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
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
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
Steve Klabnik
2fec5111ef
Bump version to 0.9.0
2014-08-22 16:17:46 -04:00
Stanley Stuart
e650863c6d
fix tests from rebasing master for embed_namespace
2014-08-13 11:38:01 -05:00
Paul Henry
76263865a7
fix uninitialized instance variable warning
...
Ruby warns that `@only` and `@except` are not initialized because if they are not passed in, they are never assigned.
Remove circular require in array_serializer
2014-08-02 14:05:37 -07:00
Kyle Fritz
00c54baae3
Support lowerCamel key format
2014-03-30 12:31:21 -04:00
Santiago Pastorino
d985e6424c
Merge pull request #462 from fab/master
...
Generator now properly detects ApplicationSerializer
2014-02-04 10:05:03 -08:00
Fab Mackojc
a49e04a6f2
Generator now properly detects ApplicationSerializer
2014-02-01 21:37:13 +11:00
Jorge Bejar
df481b2b35
Don't memoize association serializer
2014-01-09 15:30:51 -02:00
Santiago Pastorino
de78df509a
Version = 0.9.0.alpha1
2014-01-07 15:28:23 -02:00
Santiago Pastorino and Adrian Mugnolo
8fa252b4fd
Make sure generator hooks get run
...
Use Rails::Engine#load_generators instead of require +
Rails::Generators::configure!.
2013-12-30 12:03:51 -02:00
Adrian Mugnolo and Santiago Pastorino
0f4547eb77
Rename method to serializable_object
2013-12-17 16:13:50 -02:00
Adrian Mugnolo and Santiago Pastorino
f14f931957
Clean up HasOne array wrapping logic
...
Introduce private _wrap_in_array option for now.
2013-12-17 15:42:35 -02:00
Santiago Pastorino
80d9fb56d2
Merge pull request #452 from plexus/has_one_each_serializer_fix
...
Using a HasOne association twice raises an exception (Undefined method `map')
2013-12-16 17:49:26 -08:00
Arne Brasseur
8c3866532a
Fixes a bug in the HasOne association where serializing twice in a row causes
...
an exception.
2013-11-11 15:30:46 +01:00
Todd Bealmear
e0a564aa68
Fixed Rails 3 compatibility.
2013-11-04 17:45:36 -08:00
Todd Bealmear
f10f72c763
Fixed Rails 4 Controller Scaffold Generator.
2013-11-04 17:31:19 -08:00
Santiago Pastorino
99677c0c58
Pass scope through to associations via @lastobelus
...
Closes #433
2013-11-04 10:48:19 -02:00
Santiago Pastorino
60b5901af8
Don't treat has_one associations embed objects as an array
...
Closes #442
Thanks @arrtchiu for reporing and giving a test case
2013-11-04 10:09:29 -02:00
Santiago Pastorino
66f9256534
Embed objects should return singular and not wrap in array
...
Closes #437
2013-11-01 14:22:52 -02:00
Santiago Pastorino
85a9c185ca
Move responsibility of setting a serializer class and building a serializer for an association to the association class
2013-10-31 16:45:00 -02:00
Santiago Pastorino
4d4b820cbe
has_one returns arrays with roots pluralized
2013-10-30 15:26:13 -02:00
Santiago Pastorino
b44e1af5dd
Move synchronize to setup method and make CONFIG private
2013-10-24 17:42:20 -02:00
Santiago Pastorino
dc33dac56b
This is not being used
2013-10-24 16:57:42 -02:00
Santiago Pastorino
dfdc292e35
Align =
2013-10-24 16:32:18 -02:00
Arthur Neves
860acad9af
s/side_load/embed_in_root
2013-10-24 14:12:02 -04:00
Santiago Pastorino
cef6f85f44
Deprecate include in favor of side_load
2013-10-24 15:09:26 -02:00
Santiago Pastorino
48db253765
embed_in_root is now side_load
2013-10-24 14:57:41 -02:00
Santiago Pastorino
5c6541145a
Allow to embed nothing but still side loading
...
Closes #361 , #399 , #401
2013-10-24 13:24:49 -02:00
Łukasz Strzałkowski
d46584af40
Wrap config's data hash in mutex
2013-10-21 20:27:01 +00:00
Santiago Pastorino
7dcef9f0f5
Rename Settings to Config and use accessors to configure things
2013-10-21 16:23:35 -02:00
Arthur Neves
41f1855056
Add accessors to settings class
2013-10-21 13:05:39 -04:00
Santiago Pastorino
4ab16381bd
Bump version to 0.9.0.pre
2013-10-18 17:49:22 -02:00
Santiago Pastorino
73774649e3
Implement Generators
2013-10-18 17:49:21 -02:00
Santiago Pastorino
4b91d0e5ec
embed :objects is the default
...
A commit with an integration test that covers this functionality is
coming after this one
2013-10-18 17:49:20 -02:00
Santiago Pastorino
4f70dc2091
has_one serialized objects shouldn't be wrapped in an array and it's key is singular
2013-10-18 17:49:20 -02:00
Santiago Pastorino
f6ea07dd22
Do not convert attrs to String until needed
2013-10-18 17:49:20 -02:00
Santiago Pastorino
10e882a14f
Allow to set embed options from AM::Serializer
2013-10-18 17:49:20 -02:00
Santiago Pastorino
7405baafd7
Serialize associations that doesn't have an associated serializer
2013-10-18 17:49:19 -02:00
Santiago Pastorino
513e7f2166
Add setup method and Setting object to configure AMS
2013-10-18 17:49:19 -02:00
Santiago Pastorino
0e0341effc
Implement embed in root
2013-10-18 17:49:19 -02:00
Santiago Pastorino
af34adc7b5
Move key's initialization code to initializers
2013-10-18 17:49:19 -02:00
Santiago Pastorino
280fd65db8
Allow to set key for associations through options
2013-10-18 17:49:19 -02:00
Santiago Pastorino
48590a2e37
Allow to set root for associations through options
2013-10-18 17:49:19 -02:00