rails4: include root in json

turn back; it's too late to change now

refs #CNVS-21596

Change-Id: Ia2ed649e9ee700219479cee7aab48c51fe4d6c4b
Reviewed-on: https://gerrit.instructure.com/58052
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
This commit is contained in:
James Williams 2015-07-09 10:05:51 -06:00
parent 7a5029026e
commit 3c532c13a3
1 changed files with 3 additions and 1 deletions

View File

@ -259,8 +259,10 @@ class ActiveRecord::Base
# We are in the process of migrating away from including the root in all our
# json serializations at all. Once that's done, we can remove this and the
# monkey patch to Serialzer, below.
# ^hahahahahahaha
unless options.key?(:include_root)
options[:include_root] = ActiveRecord::Base.include_root_in_json
options[:include_root] = true
end
hash = serializable_hash(options)