rails4: fix mocha instantiation

refs #CNVS-21596

Change-Id: I6fa10ad374bea1cde4442bb666183a42de32ac97
Reviewed-on: https://gerrit.instructure.com/57440
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
This commit is contained in:
James Williams 2015-06-30 09:09:02 -06:00
parent 698e0ab736
commit 4135f4259d
1 changed files with 3 additions and 3 deletions

View File

@ -49,11 +49,11 @@ class ActiveRecord::Base
ar_obj
end
def self.instantiate_with_any_instantiation(a)
if obj = @@any_instantiation[[base_class, a['id'].to_i]]
def self.instantiate_with_any_instantiation(*args)
if obj = @@any_instantiation[[base_class, args.first['id'].to_i]]
obj
else
instantiate_without_any_instantiation(a)
instantiate_without_any_instantiation(*args)
end
end
class << self