fix references to the default shard settings for rails 3
Change-Id: Ie35fd3d9255c934d29799f99596fb65e75181947 Reviewed-on: https://gerrit.instructure.com/29599 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: James Williams <jamesw@instructure.com> Product-Review: Cody Cutrer <cody@instructure.com> QA-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
parent
4b48998179
commit
0b2f1bb182
|
@ -17,6 +17,13 @@ unless CANVAS_RAILS2
|
|||
reset_column_information # make sure that the id column object knows it is the primary key
|
||||
|
||||
serialize :settings, Hash
|
||||
# the default shard was already loaded, but didn't deserialize it
|
||||
if default.is_a?(self)
|
||||
settings = ActiveRecord::AttributeMethods::Serialization::Attribute.new(serialized_attributes['settings'],
|
||||
default.read_attribute('settings'),
|
||||
:serialized).unserialize
|
||||
default.settings = settings
|
||||
end
|
||||
|
||||
before_save :encrypt_settings
|
||||
|
||||
|
|
Loading…
Reference in New Issue