Sha256: af2b58e64adb0fc076f4bc2fda6eb3fde090ed727d850a5b962709d695543b42
Contents?: true
Size: 538 Bytes
Versions: 8
Compression:
Stored size: 538 Bytes
Contents
module SchemaPlus::ForeignKeys module Middleware module Schema module Define def around(env) fk_override = { :auto_create => false, :auto_index => false } save = Hash[fk_override.keys.collect{|key| [key, SchemaPlus::ForeignKeys.config.send(key)]}] begin SchemaPlus::ForeignKeys.config.update_attributes(fk_override) yield env ensure SchemaPlus::ForeignKeys.config.update_attributes(save) end end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems