add stub for local_id_for

Change-Id: I6d462ffb86a20ed197795c96437b5e281ae8fedf
Reviewed-on: https://gerrit.instructure.com/31793
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
This commit is contained in:
Rob Orton 2014-03-12 10:07:48 -06:00
parent 470bd3a04a
commit 05f4e5d1db
1 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,5 @@
#
# Copyright (C) 2011 Instructure, Inc.
# Copyright (C) 2012 - 2014 Instructure, Inc.
#
# This file is part of Canvas.
#
@ -79,6 +79,10 @@ class Shard
"default"
end
def self.local_id_for(any_id)
[any_id, Shard.default]
end
def self.global_id_for(any_id)
any_id.is_a?(ActiveRecord::Base) ? any_id.global_id : any_id
end