neilmiddleton/attr_secure — pull request #7 by dmathieu (2013-06-04 20:09:45+00:00)
Title: Custom Secret

This adds custom secret :

With a static string (no variables can be used here)

attr_secure :my_attribute, :secret => "..."

With a lambda (object is the current instance of the atribute's object).

attr_secure :my_attribute, :secret => lambda {|object| object.user.secret }