mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-24 14:56:50 +00:00
enabling flatten json as default adapter
This commit is contained in:
parent
1ea5608e78
commit
d061b2e9f4
@ -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 = :flatten_json
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -20,7 +20,6 @@ class Foo < Rails::Application
|
|||||||
config.active_support.test_order = :random
|
config.active_support.test_order = :random
|
||||||
config.logger = Logger.new(nil)
|
config.logger = Logger.new(nil)
|
||||||
ActionController::Base.cache_store = :memory_store
|
ActionController::Base.cache_store = :memory_store
|
||||||
ActiveModel::Serializer.config.adapter = :flatten_json
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
FileUtils.mkdir_p(File.expand_path('../../tmp/cache', __FILE__))
|
FileUtils.mkdir_p(File.expand_path('../../tmp/cache', __FILE__))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user