Skip to content

Commit 745cd82

Browse files
committed
Add changelog.
1 parent 4ce575f commit 745cd82

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Breaking changes:
1313

1414
Features:
1515

16+
- [#1225](https://github.com/rails-api/active_model_serializers/pull/1125) Better serializer lookup, get namespaced resources and nested serializers inferred (@beauby)
1617
- [#1172](https://github.com/rails-api/active_model_serializers/pull/1172) Better serializer registration, get more than just the first module (@bf4)
1718
- [#1158](https://github.com/rails-api/active_model_serializers/pull/1158) Add support for wildcards in `include` option (@beauby)
1819
- [#1127](https://github.com/rails-api/active_model_serializers/pull/1127) Add support for nested

lib/active_model/serializer.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ def self.digest_caller_file(caller_line)
112112
Digest::MD5.hexdigest(serializer_file_contents)
113113
end
114114

115-
# TODO(beauby): Cache this.
116115
def self.serializer_lookup_chain_for(klass)
117116
chain = []
118117

test/serializers/serializer_for_test.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,18 @@ def test_overwritten_serializer_for_array
2828

2929
class SerializerTest < Minitest::Test
3030
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+
3534
class PostSerializer < ActiveModel::Serializer
3635
class CommentSerializer < ActiveModel::Serializer
3736
end
3837
end
3938
end
39+
4040
class MyProfile < Profile
4141
end
42+
4243
class CustomProfile
4344
def serializer_class; ProfileSerializer; end
4445
end

0 commit comments

Comments
 (0)