fix active record as_json for rails 3

Change-Id: Ie510ac95f5f15dbda9667fca60ebf32a55b13c61
Reviewed-on: https://gerrit.instructure.com/27900
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
This commit is contained in:
James Williams 2013-12-27 07:55:25 -07:00
parent 516d5c963e
commit c72c0e3196
1 changed files with 1 additions and 1 deletions

View File

@ -268,7 +268,7 @@ class ActiveRecord::Base
options[:include_root] = ActiveRecord::Base.include_root_in_json options[:include_root] = ActiveRecord::Base.include_root_in_json
end end
hash = Serializer.new(self, options).serializable_record hash = CANVAS_RAILS2 ? Serializer.new(self, options).serializable_record : serializable_hash(options)
if options[:permissions] if options[:permissions]
obj_hash = options[:include_root] ? hash[self.class.base_ar_class.model_name.element] : hash obj_hash = options[:include_root] ? hash[self.class.base_ar_class.model_name.element] : hash