aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/serialization.rb
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-03-04 20:30:05 +0100
committerYves Senn <yves.senn@gmail.com>2013-03-04 21:18:40 +0100
commit8c7d4018e0ddec462075027defb3575c47952c3e (patch)
tree8ae96aba301c1d1d90996cefe077f674121fa2b2 /activerecord/lib/active_record/serialization.rb
parenteeba67947031478e4376e349c91ea4d9ca185579 (diff)
downloadrails-8c7d4018e0ddec462075027defb3575c47952c3e.tar.gz
rails-8c7d4018e0ddec462075027defb3575c47952c3e.tar.bz2
rails-8c7d4018e0ddec462075027defb3575c47952c3e.zip
`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`.
Diffstat (limited to 'activerecord/lib/active_record/serialization.rb')
-rw-r--r--activerecord/lib/active_record/serialization.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/serialization.rb b/activerecord/lib/active_record/serialization.rb
index 6b55af4205..bd9079b596 100644
--- a/activerecord/lib/active_record/serialization.rb
+++ b/activerecord/lib/active_record/serialization.rb
@@ -5,7 +5,7 @@ module ActiveRecord #:nodoc:
include ActiveModel::Serializers::JSON
included do
- self.include_root_in_json = true
+ self.include_root_in_json = false
end
def serializable_hash(options = nil)