File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ Breaking changes:
13
13
14
14
Features:
15
15
16
+ - [ #1225 ] ( https://github.com/rails-api/active_model_serializers/pull/1125 ) Better serializer lookup, get namespaced resources and nested serializers inferred (@beauby )
16
17
- [ #1172 ] ( https://github.com/rails-api/active_model_serializers/pull/1172 ) Better serializer registration, get more than just the first module (@bf4 )
17
18
- [ #1158 ] ( https://github.com/rails-api/active_model_serializers/pull/1158 ) Add support for wildcards in ` include ` option (@beauby )
18
19
- [ #1127 ] ( https://github.com/rails-api/active_model_serializers/pull/1127 ) Add support for nested
Original file line number Diff line number Diff line change @@ -112,7 +112,6 @@ def self.digest_caller_file(caller_line)
112
112
Digest ::MD5 . hexdigest ( serializer_file_contents )
113
113
end
114
114
115
- # TODO(beauby): Cache this.
116
115
def self . serializer_lookup_chain_for ( klass )
117
116
chain = [ ]
118
117
Original file line number Diff line number Diff line change @@ -28,17 +28,18 @@ def test_overwritten_serializer_for_array
28
28
29
29
class SerializerTest < Minitest ::Test
30
30
module ResourceNamespace
31
- class Post < ::Model
32
- end
33
- class Comment < ::Model
34
- end
31
+ Post = Class . new ( ::Model )
32
+ Comment = Class . new ( ::Model )
33
+
35
34
class PostSerializer < ActiveModel ::Serializer
36
35
class CommentSerializer < ActiveModel ::Serializer
37
36
end
38
37
end
39
38
end
39
+
40
40
class MyProfile < Profile
41
41
end
42
+
42
43
class CustomProfile
43
44
def serializer_class ; ProfileSerializer ; end
44
45
end
You can’t perform that action at this time.
0 commit comments