From 8c7d4018e0ddec462075027defb3575c47952c3e Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Mon, 4 Mar 2013 20:30:05 +0100 Subject: `ActiveRecord::Base.include_root_in_json` is `false` by default. Closes #9459. The PR #6597 unified the configuration for `include_root_in_json` in AM and AR to `false`. Later on with the refactoring commit: e030f26 the value in AR was set to `true` but I think this was not on purpose. With this commit both AM and AR will have the same configuration for `include_root_in_json`, which is `false`. --- activerecord/test/cases/serialization_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/test') diff --git a/activerecord/test/cases/serialization_test.rb b/activerecord/test/cases/serialization_test.rb index eb9cb91e32..c46060a646 100644 --- a/activerecord/test/cases/serialization_test.rb +++ b/activerecord/test/cases/serialization_test.rb @@ -18,6 +18,10 @@ class SerializationTest < ActiveRecord::TestCase } end + def test_include_root_in_json_is_false_by_default + assert_equal false, ActiveRecord::Base.include_root_in_json, "include_root_in_json should be false by default but was not" + end + def test_serialize_should_be_reversible FORMATS.each do |format| @serialized = Contact.new.send("to_#{format}") -- cgit v1.2.3