lib/lockbox/utils.rb in lockbox-0.2.1 vs lib/lockbox/utils.rb in lockbox-0.2.2
- old
+ new
@@ -16,10 +16,10 @@
Lockbox.new(options)
end
def self.encrypted_options(record, name)
- record.class.respond_to?(:lockbox_attachments) && record.class.lockbox_attachments[name.to_sym]
+ record.class.respond_to?(:lockbox_attachments) ? record.class.lockbox_attachments[name.to_sym] : nil
end
def self.decode_key(key)
if key.encoding != Encoding::BINARY && key =~ /\A[0-9a-f]{64,128}\z/i
key = [key].pack("H*")