Commit Graph

706 Commits

Author SHA1 Message Date
Santiago Pastorino
513e7f2166 Add setup method and Setting object to configure AMS 2013-10-18 17:49:19 -02:00
Santiago Pastorino
29148cbe1c Add AC::Serialization#serialization_scope as a class level method 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
Santiago Pastorino
8a495b1d00 Embedded has_one returns an array with the key pluralized 2013-10-18 17:49:19 -02:00
Santiago Pastorino
3fcd8c5f98 Define root and root= as aliases of _root= 2013-10-18 17:49:18 -02:00
Santiago Pastorino
7ba05c02e3 Make Serializable module which implements as_json 2013-10-18 17:49:18 -02:00
Santiago Pastorino
e6993c677b Add missing requires 2013-10-18 17:49:18 -02:00
Santiago Pastorino
a820e9774f Add ArraySerializer's root and meta features 2013-10-18 17:49:18 -02:00
Santiago Pastorino
70ea6c6bc7 Add has_one and has_many :serialize => tests 2013-10-18 17:49:18 -02:00
Santiago Pastorino
cd3e5e9de2 Assign the association in the setup method 2013-10-18 17:49:18 -02:00
Santiago Pastorino
f647b7ae74 Implement each_serializer 2013-10-18 17:49:18 -02:00
Santiago Pastorino
7e83f0c29d Implement ArraySerializer 2013-10-18 17:49:18 -02:00
Santiago Pastorino
61a1669a86 Implement has_many 2013-10-18 17:49:18 -02:00
Santiago Pastorino
fa61314d0e Add AR integration tests 2013-10-18 17:49:18 -02:00
Santiago Pastorino
4c7599cfff Use more meaningful model names for tests 2013-10-18 17:49:18 -02:00
Santiago Pastorino
516f5bdceb Implement has_one's embed ids include true 2013-10-18 17:49:18 -02:00
Santiago Pastorino
52bb3f6929 Implement has_one's embed objects 2013-10-18 17:49:17 -02:00
Santiago Pastorino
d756ae4a70 Implement has_one's and serialize_ids 2013-10-18 17:49:17 -02:00
Santiago Pastorino
01bc534976 Remove SerializerSupport 2013-10-18 17:49:17 -02:00
Santiago Pastorino
0d4dfb69a9 Fix directories the project is on top level dir 2013-10-18 17:49:17 -02:00
Santiago Pastorino
0c91564101 Remove method redefined warning 2013-10-18 17:49:17 -02:00
Santiago Pastorino
9e75625b1f Re-order properties 2013-10-18 17:49:17 -02:00
Santiago Pastorino
93baaa96b1 Implement meta and meta_key for AM::Serializer 2013-10-18 17:49:17 -02:00
Santiago Pastorino
af357619c1 Add AMS support to AR objects 2013-10-18 17:49:17 -02:00
Santiago Pastorino
a25c352525 Move models and serializers in test to fixtures.rb file 2013-10-18 17:49:17 -02:00
Santiago Pastorino
0d3b56e9cf Implement AC integration 2013-10-18 17:49:17 -02:00
Santiago Pastorino
d41e5ccef7 Implement SerializerSupport class 2013-10-18 17:49:17 -02:00
Santiago Pastorino
45453f638b Tests refactor 2013-10-18 17:49:17 -02:00
Santiago Pastorino
b6f9c5ee43 Implement Serializer's scope 2013-10-18 17:49:16 -02:00
Santiago Pastorino
c3f857d1b6 Implement Serializer's root 2013-10-18 17:49:16 -02:00
Santiago Pastorino
7143eb8301 Serialize just attributes 2013-10-18 17:49:16 -02:00
Santiago Pastorino
14f51f2ea9 Remove everything, rewrite of AMS starts here 2013-10-18 17:46:18 -02:00
Steve Klabnik
919bb38401 Merge pull request #382 from mikegee/360-design-and-implementation-wrapped
Addition of Design and Implementation section to Readme (wrapped)
2013-08-29 17:30:59 -07:00
mikegee
23748e7f2b add Design and Implementation section to readme
credit to @garysweaver
2013-08-29 16:04:20 -04:00
Peter Schröder
79b84a10e3 add MiniTest and RSpec examples 2013-08-13 20:16:11 +02:00
Peter Schröder
56eaa61233 add an example for how to test serializers easily
off topic: please deactivate the WIKI if there is no content in it
2013-08-13 15:17:16 +02:00
Steve Klabnik
8ac4bf9006 Merge pull request #348 from stiller/master
Fixed typo
2013-07-04 12:35:10 -07:00
stiller
a62680c883 Update README.md
Fixed typo.
2013-07-04 11:32:25 +02:00
Steve Klabnik
82cc4e815a Merge pull request #344 from tjschuck/caching_docs
Add docs about caching
2013-06-28 02:16:41 -07:00
T.J. Schuck
027aa38138 Add docs about caching 2013-06-26 16:48:36 -04:00
Steve Klabnik
cee5705576 Merge pull request #338 from socialreferral/master
Use 1.9 style hash syntax in the docs
2013-06-18 13:36:05 -07:00
Andre Meij
54ce37b956 Change to 1.9 Hash syntax in docs 2013-06-18 16:40:14 +02:00
Andre Meij
88ff42ebc8 Use 1.9 hashes in the readme 2013-06-18 16:35:03 +02:00
Logan Serman
b20ad33407 Updating the meta key documentation to warn users that { root: false } will cause the serializer to ignore the meta key as it leads to invalid JSON.
https://github.com/rails-api/active_model_serializers/issues/332
2013-06-16 01:01:03 -05:00
Steve Klabnik
4f185efa90 Merge pull request #329 from jgaskins/patch-1
Remove errant punctuation
2013-06-08 13:11:16 -07:00
Jamie Gaskins
74af00f17a Remove errant apostrophes
Apostrophes don't indicate pluralization.
2013-06-08 12:18:34 -03:00
Steve Klabnik
614edeff7f Merge pull request #327 from ansonhoyt/master
Update docs with example of attribute named "object"
2013-06-06 15:58:42 -07:00