Alexey Dubovskoy
024b2d51d3
re: RuboCop - replace rocket style hashes
2016-06-20 22:14:12 +01:00
Alexey Dubovskoy
004f1437d8
re: RuboCop - hash indention corrections
2016-06-20 22:13:21 +01:00
Alexey Dubovskoy
f15f6850de
re: RuboCop: Bulk minor style corrections
2016-06-20 22:12:16 +01:00
Benjamin Fleischer
32a3b53892
Bump to 0.10.1
2016-06-16 09:41:10 -05:00
Benjamin Fleischer
0fed4869df
Merge pull request #1754 from bf4/handle_missing_serialization_context_when_paginating
...
Fix #1759 , Grape integration, adds serialization_context
2016-06-15 15:19:35 -05:00
Yohan Robert
b4615ea90f
Merge pull request #1805 from ScottKbka/fixingTyposInSerializerGuides
...
Fixing typo in Serializers guide for including a block after
2016-06-15 13:00:52 +02:00
Scott Kobewka
43b6bae7fe
Fixing typo in Serializers guide for including a block after
2016-06-14 14:27:23 -04:00
Benjamin Fleischer
1a9c62215a
Use with_adapter(&block) to fix failing tests
...
I missed that the code was changing global state.
2016-06-14 09:46:22 -05:00
Onome
580492282f
Fix #1759 , Grape integration, adds serialization_context ( #4 )
...
* Fix #1759 , Grape integration, adds serialization_context
- `serialization_context` is added in grape formatter so grape continues to render models without an explicit call to the `render` helper method
- Made it straightforward for subclasses to add other serializer options (such as `serialization_scope`).
* Updated Grape tests to include:
- paginated collections
- implicit Grape serializer (i.e. without explicit invocation of `render` helper method)
* Update Changelog with fixes.
2016-06-14 09:46:22 -05:00
Benjamin Fleischer
a7296e8a92
Fix #1759 , Grape integration, adds serialization_context
...
- improves improves serialization_context to take options and not depend
on a `request` object.
- adds descriptive error on missing serialization_context.
- Document overriding `CollectionSerializer#paginated?`.
2016-06-14 09:45:30 -05:00
Benjamin Fleischer
a52189c9c0
Merge pull request #1792 from bf4/spelling_fixes
...
Fix spelling
2016-06-09 19:44:57 -05:00
Benjamin Fleischer
5017bb7f2e
Fix spelling
...
```
cat << 'EOF' > .git/hooks/pre-push
bundle exec rake rubocop
if command -v misspell >/dev/null; then
misspell -w -error -source=text {app,config,lib,spec,test,docs,bin}/**/* 2>/dev/null
fi
EOF
chmod +x .git/hooks/pre-push
```
2016-06-09 03:41:01 -05:00
Benjamin Fleischer
3594634a04
Add changelog for 1287 [ci skip]
2016-06-09 03:33:02 -05:00
Benjamin Fleischer
848479b460
Merge branch 'vasilakisfil-feat/fields_from_constructor'
2016-06-09 03:27:09 -05:00
Filippos Vasilakis
be01fc8ee7
Pass fields down from constructor
2016-06-09 03:26:52 -05:00
Benjamin Fleischer
cd9689683c
Merge branch 'ouvrages-exclude_nil_links'
2016-06-09 02:55:32 -05:00
Benjamin Fleischer
b9e7dc5584
Merge pull request #1785 from bf4/fix_benchmark_expected_cache_response
...
Make bencharked model names reflect relationships; fix expected response
2016-06-09 00:07:59 -05:00
Benjamin Fleischer
af368af53e
Make bencharked model names reflect relationships; fix expected response
2016-06-08 23:40:36 -05:00
Benjamin Fleischer
3d9ab37ffa
Merge pull request #1781 from bf4/serializer_cleanup_6
...
Fix up caching, especially fragment_cache
2016-06-08 23:39:40 -05:00
Benjamin Fleischer
b599360ae3
Provide convenience serializer_class for all the self.class calls
...
per groyoh
https://github.com/rails-api/active_model_serializers/pull/1781#discussion_r66021340
2016-06-07 20:28:50 -05:00
Benjamin Fleischer
5375e009e2
Test caching with fragmented key
...
- on association, fix up assocation logic
- on attribute
2016-06-07 20:26:38 -05:00
Benjamin Fleischer
b8924157d7
Remove remaining fragmented cache class
2016-06-07 03:42:03 -05:00
Benjamin Fleischer
253205bb49
Improve Coverage
2016-06-07 01:50:03 -05:00
Benjamin Fleischer
35a7c81034
Fix up caching, especially fragment_cache
2016-06-07 00:52:05 -05:00
Benjamin Fleischer
d191342a6c
Merge pull request #1766 from bf4/serializer_cleanup_4
...
Move serialization logic into Serializer and CollectionSerializer
2016-06-05 23:56:03 -05:00
Benjamin Fleischer
7254d34c90
Move Serializer#serialize into Serializer#serializable_hash
2016-06-05 23:33:37 -05:00
Benjamin Fleischer
caf4910b6e
Remove controller :assigns warnings/shim
2016-06-04 15:00:51 -05:00
Benjamin Fleischer
913f396bb1
Move adapter cache properties to class level (where they belong).
2016-06-04 15:00:51 -05:00
Benjamin Fleischer
516e7da8ff
Move serialization logic into Serializer and CollectionSerializer
2016-06-04 14:59:51 -05:00
Benjamin Fleischer
41575e36f7
Moving Attributes#serializable_hash_for_single_resource to Serializer
2016-06-04 14:59:51 -05:00
Benjamin Fleischer
f28e486d4a
Remove Attributes adapter recursion
2016-06-04 14:59:51 -05:00
Spencer Oberstadt
998ca55e3d
Fix docs for deserialization ( #1768 )
...
I found in the tests that deserialization expects relationships to be under a `relationships` key.
https://github.com/rails-api/active_model_serializers/blob/master/test/action_controller/json_api/deserialization_test.rb#L68
2016-06-01 16:50:15 -04:00
Yohan Robert
44128a5d23
Merge pull request #1769 from remear/upgrade-rubocop
...
Upgrade to rubocop ~> 0.40.0
2016-06-01 19:51:10 +02:00
Ben Mills
d900b09f8d
Upgrade to rubocop ~> 0.40.0
2016-06-01 09:21:29 -06:00
Benjamin Fleischer
f2f747edda
Merge pull request #1765 from bf4/serializer_cleanup_3
...
Remove unnecessary Serializer#cached_fields; Extracted cached_attributes
2016-06-01 01:41:42 -05:00
Benjamin Fleischer
385abb4ba0
Simplify Serializer#cached_attributes to take a fields argument
2016-06-01 01:02:17 -05:00
Benjamin Fleischer
ba23de686d
Complete extracting to Serializer#cached_attributes
2016-06-01 01:02:13 -05:00
Benjamin Fleischer
96750b2f9a
Remove unnecessary Serializer#cached_fields
2016-06-01 00:47:10 -05:00
Benjamin Fleischer
eb86663393
Remove unnecessary Adapter::Base#resource_object_for
2016-06-01 00:43:24 -05:00
Benjamin Fleischer
fcfbc0d529
Merge pull request #1764 from bf4/serializer_cleanup_2
...
Remove unnecessary Adapter::Base#cache_attributes
2016-06-01 00:42:54 -05:00
Benjamin Fleischer
3f38a60d89
Merge pull request #1763 from bf4/serializer_cleanup_1
...
Remove unnecessary Adapter::Base#cache_check
2016-06-01 00:37:23 -05:00
Benjamin Fleischer
ee518e1856
Remove unnecessary Adapter::Base#cache_attributes
2016-06-01 00:35:11 -05:00
Benjamin Fleischer
0cc87fde40
Remove unnecessary Adapter::Base#cache_check
2016-06-01 00:15:29 -05:00
Yohan Robert
b8af2892f7
[skip ci] Fix root key documentation ( #1761 )
...
The current documentation stated that it was not possible to override
the root key for the JSON adapter. This was removed from the
documentation and it now links the useful documentation pages.
2016-05-31 13:30:47 -06:00
Benjamin Fleischer
6e609c1218
Merge pull request #1760 from bf4/remove_dead_file
...
Remove IncludeTree; missing from #1685
2016-05-31 07:57:18 -05:00
Benjamin Fleischer
5a4eef6cea
Remove IncludeTree; missing from #1685
2016-05-30 23:08:23 -05:00
Ryunosuke Sato
4f085441bd
Update README to write how to configure adapter ( #1758 )
2016-05-30 15:43:00 -04:00
Lucas Hosseini
f48fd2a327
Extract IncludeTree. ( #1685 )
2016-05-28 10:07:11 -04:00
Ben Mills
f2cb497fe3
Add key transform performance note to docs ( #1753 )
2016-05-26 16:19:19 -04:00
Ben Mills
4de8d8c16a
Remove default key case change message ( #1752 )
2016-05-26 15:15:30 -04:00