From dcc4f27f63dbfaa36a8f29035615178982f2464a Mon Sep 17 00:00:00 2001 From: Mikael Henriksson Date: Sat, 26 Oct 2013 22:13:34 +0200 Subject: [PATCH] Fix root initializer documentation Removed the on load stuff since there is no autoloading in AMS anymore. --- README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c35a70084..87b8f5f3f 100644 --- a/README.md +++ b/README.md @@ -161,13 +161,11 @@ You have 4 options to disable the root element, each with a slightly different s In an initializer: ```ruby -ActiveSupport.on_load(:active_model_serializers) do - # Disable for all serializers (except ArraySerializer) - ActiveModel::Serializer.root = false +# Disable for all serializers (except ArraySerializer) +ActiveModel::Serializer.root = false - # Disable for ArraySerializer - ActiveModel::ArraySerializer.root = false -end +# Disable for ArraySerializer +ActiveModel::ArraySerializer.root = false ``` #### 2. Disable root per render call in your controller