Skip to content

Commit 2c9c36e

Browse files
committed
adding json_api as default adapter
1 parent ece43f3 commit 2c9c36e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/active_model/serializer/configuration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module Configuration
66

77
included do |base|
88
base.config.array_serializer = ActiveModel::Serializer::ArraySerializer
9-
base.config.adapter = :json
9+
base.config.adapter = :json_api
1010
end
1111
end
1212
end

test/fixtures/poro.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
ActiveModel::Serializer.config.adapter = :json
2+
13
class Model
24
def initialize(hash={})
35
@attributes = hash
@@ -64,7 +66,7 @@ class ProfilePreviewSerializer < ActiveModel::Serializer
6466
Bio = Class.new(Model)
6567
Blog = Class.new(Model)
6668
Role = Class.new(Model)
67-
User = Class.new(Model)
69+
User = Class.new(Model)
6870
Location = Class.new(Model)
6971
Place = Class.new(Model)
7072

0 commit comments

Comments
 (0)