mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-24 23:06:50 +00:00
adding json_api as default adapter
This commit is contained in:
parent
ece43f344a
commit
2c9c36e21f
@ -6,7 +6,7 @@ module ActiveModel
|
|||||||
|
|
||||||
included do |base|
|
included do |base|
|
||||||
base.config.array_serializer = ActiveModel::Serializer::ArraySerializer
|
base.config.array_serializer = ActiveModel::Serializer::ArraySerializer
|
||||||
base.config.adapter = :json
|
base.config.adapter = :json_api
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
2
test/fixtures/poro.rb
vendored
2
test/fixtures/poro.rb
vendored
@ -1,3 +1,5 @@
|
|||||||
|
ActiveModel::Serializer.config.adapter = :json
|
||||||
|
|
||||||
class Model
|
class Model
|
||||||
def initialize(hash={})
|
def initialize(hash={})
|
||||||
@attributes = hash
|
@attributes = hash
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user