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:
parent
698e0ab736
commit
4135f4259d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue