README.markdown in shuber-attr_encrypted-1.0.1 vs README.markdown in shuber-attr_encrypted-1.0.2

- old
+ new

@@ -102,9 +102,22 @@ class User attr_encrypted :email, :key => proc { |user| ... } end +### Conditional encrypting ### + +There may be times that you want to only encrypt when certain conditions are met. For example maybe you're using rails and you don't want to encrypt +attributes when you're in development mode. You can specify conditions like this: + + class User + attr_encrypted :email, :key => 'a secret key', :unless => Rails.env.development? + end + +You can specify both `:if` and `:unless` options. If you pass a symbol representing an instance method then the result of the method will be evaluated. +Any objects that respond to :call are evaluated as well. + + ### Custom encryptor ### The [Huberry::Encryptor](http://github.com/shuber/encryptor) class is used by default. You may use your own custom encryptor by specifying the `:encryptor`, `:encrypt_method`, and `:decrypt_method` options \ No newline at end of file