lib/lockbox/utils.rb in lockbox-0.4.7 vs lib/lockbox/utils.rb in lockbox-0.4.8

- old
+ new

@@ -14,10 +14,16 @@ options[k] = context.send(v) end end unless options[:key] || options[:encryption_key] || options[:decryption_key] - options[:key] = Lockbox.attribute_key(table: table, attribute: attribute, master_key: options.delete(:master_key), encode: false) + options[:key] = + Lockbox.attribute_key( + table: options.delete(:key_table) || table, + attribute: options.delete(:key_attribute) || attribute, + master_key: options.delete(:master_key), + encode: false + ) end if options[:previous_versions].is_a?(Array) options[:previous_versions] = options[:previous_versions].dup options[:previous_versions].each_with_index do |version, i|