README.markdown in shuber-attr_encrypted-1.0.3 vs README.markdown in shuber-attr_encrypted-1.0.4

- old
+ new

@@ -1,11 +1,11 @@ attr\_encrypted =============== Generates attr\_accessors that encrypt and decrypt attributes transparently -Works with any class including ActiveRecord and DataMapper +Works with ANY class including ActiveRecord and DataMapper Installation ------------ @@ -95,11 +95,11 @@ end #### Procs as keys #### -You can pass a proc object as the `:key` option as well: +You can pass a proc/lambda object as the `:key` option as well: class User attr_encrypted :email, :key => proc { |user| ... } end @@ -107,15 +107,15 @@ ### 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 + class User < ActiveRecord::Base 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. +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 \ No newline at end of file