mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Restrict serializable_hash to accepted options, only for tests
This commit is contained in:
@@ -60,10 +60,11 @@ module ActionController
|
||||
end
|
||||
|
||||
def render_resource_with_transform_with_global_config
|
||||
setup_post
|
||||
old_transform = ActiveModelSerializers.config.key_transform
|
||||
setup_post
|
||||
ActiveModelSerializers.config.key_transform = :camel_lower
|
||||
render json: @post, serializer: PostSerializer, adapter: :json_api
|
||||
ensure
|
||||
ActiveModelSerializers.config.key_transform = old_transform
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user