lib/huberry/attr_encrypted/adapters/sequel.rb in shuber-attr_encrypted-1.0.5 vs lib/huberry/attr_encrypted/adapters/sequel.rb in shuber-attr_encrypted-1.0.6

- old
+ new

@@ -1,16 +1,12 @@ if defined?(Sequel) module Huberry module AttrEncrypted module Adapters module Sequel - protected - # Calls attr_encrypted with the options <tt>:encode</tt> and <tt>:marshal</tt> set to true - # unless they've already been specified - def attr_encrypted(*attrs) - options = { :encode => true, :marshal => true }.merge(attrs.last.is_a?(Hash) ? attrs.pop : {}) - super *(attrs << options) - end + def self.extended(base) + base.attr_encrypted_options[:encode] = true + end end end end end \ No newline at end of file