Commit Graph

1355 Commits

Author SHA1 Message Date
Mateo Murphy
4fcacb0b16 Update CHANGELOG.md 2015-03-22 20:43:56 -04:00
Mateo Murphy
946d1dba14 Remove debug include 2015-03-22 20:43:56 -04:00
Mateo Murphy
294d06624f Remove unused embed option 2015-03-22 20:43:56 -04:00
Mateo Murphy
33f3a88ba0 Implement included and id and type as per spec 2015-03-22 20:43:56 -04:00
Mateo Murphy
d82c599c68 Always use plural for linked types
Although spec is agnostic about inflection rules, examples given are plural
2015-03-22 20:43:11 -04:00
Mateo Murphy
0f55f21266 Update format of links 2015-03-22 20:41:20 -04:00
Mateo Murphy
83c2854094 Rename add_linked to add_included
Better reflect generated output
2015-03-22 20:38:30 -04:00
Mateo Murphy
da86747a3e Use symbol for root in jsonapi, fix tests 2015-03-22 20:38:29 -04:00
Mateo Murphy
3ba4386bda Root is always "data" for jsonapi 2015-03-22 20:37:25 -04:00
Guillermo Iguaran
b68d7f4826 Merge pull request #852 from mateomurphy/serializer-options-fix
Fix options merge order in `each_association`
2015-03-22 18:54:07 -05:00
Guillermo Iguaran
e901a2108f Merge pull request #850 from mateomurphy/association-override-fix
Use association value for determining serializer used
2015-03-22 18:53:45 -05:00
Mateo Murphy
03372ea61d Fix options merge order in each_association
Custom association serializers were getting clobbered when using an each serializer.
2015-03-20 00:22:46 -04:00
Mateo Murphy
ca985e1afd Use association value for determining serializer used
Ensures overridden association value works when orignal association does not return a result.
2015-03-19 23:28:00 -04:00
Alexandre de Oliveira
9cf45e7476 Merge pull request #843 from rails-api/remove-mailing-list-from-readme
Remove the mailing list from the README
2015-03-19 19:29:42 -03:00
Josh Smith
9058d5fce7 Merge pull request #842 from rails-api/add-contribution-process
Add notes on how you can help to contributing documentation
2015-03-15 23:01:14 -07:00
Josh Smith
65cf7d41c9 Add suggestions from João 2015-03-15 20:26:33 -07:00
Josh Smith
cd2f2c8884 Remove the mailing list from the README
We discussed this previously, but I think it's time for the mailing list to be removed from the README. Every day more discussion, issues, and pull requests happen here then ever before. The mailing list is not representative of this activity and only dilutes the purpose of the blossoming community we're finding here.

A related note: I think we should actively encourage folks to ask questions on StackOverflow with the AMS tag, and put some documentation in here about that. I can open a separate PR for this later, but it would require more than a few of us to actively monitor SO and help where we can. If we successfully do this, then I think we effectively cover all the use cases the mailing list originally may have had.
2015-03-15 19:53:19 -07:00
Josh Smith
89ebba239c Add notes on how you can help to contributing documentation 2015-03-15 19:44:34 -07:00
Alexandre de Oliveira
0446a9714d Merge pull request #833 from lsylvester/cache-serializers-for-class
Cache serializers for class
2015-03-13 19:55:49 -03:00
Lachlan Sylvester
270b31258f remove the thread_safe dependency. Relay on rails for this 2015-03-12 16:01:48 +11:00
Guillermo Iguaran
4b32e3913c Merge pull request #837 from rails-api/store-options-in-array-serializers
Store options in array serializers
2015-03-11 15:50:52 -05:00
Alexandre de Oliveira
af81a403e3 Passes serializer options down into associations 2015-03-11 16:37:14 -03:00
Alexandre de Oliveira
bcd3844e58 Stores passed in options in array serializers
This is supported in single serializers. This adds support for passing
options from array serializers to each serializer in it.
2015-03-11 16:14:09 -03:00
Guillermo Iguaran
73aeba4177 Merge pull request #836 from rails-api/stores-passed-in-options
Makes passed in options accessible inside serializers
2015-03-11 13:21:36 -05:00
Alexandre de Oliveira
3e8325b63e Merge pull request #773 from sweatypitts/master
Make json api adapter 'include' option accept an array
2015-03-11 14:59:39 -03:00
Alexandre de Oliveira
48650ecf7e Makes passed in options accessible inside serializers
In some cases, we want to pass arguments from the controller and we want
to serializer a resource according to that. This allows serializers to
use the `options` method to retrieve whatever was passed in via
arguments.
2015-03-11 14:53:57 -03:00
Robbie Pitts
ad5677c4ec Make json api adapter 'include' option accept an array, accommodate comma delimited string for legacy reasons 2015-03-11 10:01:44 -04:00
Guillermo Iguaran
b8df4b57a1 Merge pull request #830 from JoshSmith/add-contributing-readme
Add contributing readme
2015-03-10 19:23:49 -05:00
Lachlan Sylvester
980d1ced81 add explicit thread_safe dependency 2015-03-11 11:15:17 +11:00
lsylvester
2b0c5ee084 clear the cache between requests 2015-03-11 09:53:47 +11:00
lsylvester
3fb560908e cache the serializers for a class 2015-03-11 09:53:47 +11:00
Guillermo Iguaran
d55f3b33b4 Merge pull request #811 from mateomurphy/scope
Reimplement serialization scope and scope_name
2015-03-10 10:16:06 -05:00
Josh Smith
c6d6021f32 Add link to our labels 2015-03-08 12:33:00 -07:00
Josh Smith
fa4a6a7ae7 Add CONTRIBUTING.md and update README.md to point to it 2015-03-08 12:30:43 -07:00
Alexandre de Oliveira
3389218fd3 Merge pull request #725 from ggordon/has_one_support
Support has_one to be compatible with 0.8.x
2015-03-05 15:08:25 -08:00
Alexandre de Oliveira
32343d4575 Merge pull request #822 from bf4/fix_has_one
Replace has_one with attribute in template
2015-03-03 11:13:29 -08:00
Gary Gordon
c6044286ef Workaround order dependent test failure 2015-03-01 13:47:40 -05:00
Gary Gordon
651b99f22e Support has_one to be compatible with 0.8.x
Update README and CHANGELOG
2015-03-01 13:47:34 -05:00
Alexandre de Oliveira
77fb050d24 Merge pull request #821 from wjordan/patch-1
Fix explicit serializer for associations
2015-03-01 08:46:27 -05:00
Alexandre de Oliveira
3505bc64a3 Merge pull request #798 from donbobka/feature/fix_lost_test
Fix lost test `test_include_multiple_posts_and_linked`
2015-03-01 08:41:13 -05:00
Benjamin Fleischer
79653ac733 Replace has_one with attribute in template 2015-02-25 14:20:18 -06:00
Will Jordan
f4eb33d6e9 Update test_includes_linked_comments with correct expected result 2015-02-24 18:46:04 -08:00
Will Jordan
f2ee544a88 Fix explicit serializer for associations 2015-02-24 16:01:43 -08:00
Mateo Murphy
232e367560 Add serialization_scope_name_test 2015-02-12 17:48:43 -05:00
Mateo Murphy
2962f3f64e Reimplement serialization scope and scope_name 2015-02-09 11:24:41 -05:00
Guillermo Iguaran
a8243761fe Merge pull request #807 from alexstophel/update-readme
Add Overriding attribute methods section to README.
2015-02-07 17:16:34 -05:00
Alex Stophel
13243f2e70 Add Overriding attribute methods section to README. 2015-02-07 00:09:50 -05:00
Alexandre de Oliveira
5680436f9e Merge pull request #693 from joaomdmoura/cache-support
Cache Support at AMS 0.10.0
2015-02-04 10:38:25 -02:00
Joao Moura
8a432ad2b3 Adding cache support to version 0.10.0
It's a new implementation of cache based on ActiveSupport::Cache.
The implementation abstracts the cache in Adapter class on a
private method called cached_object, this method is intended
to be used on Adapters inside serializable_hash method in order
to cache each instance of the object that will be returned by
the serializer.

Some of its features are:
- A different syntax. (no longer need the cache_key method).
- An options argument that have the same arguments of ActiveSupport::Cache::Store, plus a key option that will be the prefix of the object cache on a pattern "#{key}-#{object.id}".
- It cache the objects individually and not the whole Serializer return, re-using it in different requests (as a show and a index method for example.)
2015-02-02 14:53:34 -02:00
Vladimir Lyzo
54d6696e7c Fix lost test test_include_multiple_posts_and_linked 2015-01-31 19:44:22 +03:00