New to Rails 3? Check out the Ruby on Rails 3 Tutorial book and screencast.

A book and screencast series showing you how to develop and deploy industrial-strength Rails apps in a direct, step by step way. The screencast series includes 12 lessons over more than 15 hours! Get the best "over the shoulder" experience of following what a top Rails 3 developer does when building an app today. Click here to learn more.

attr_encrypted: Encrypts and Decrypts Your Attributes Transparently

In Miscellaneous

attr_encrypted is a Ruby library by Sean Huber that generates attr_accessors that can encrypt and decrypt your attribute data transparently and on the fly. attr_encrypted comes as a gem, and isn't strictly for Rails only - it supports ActiveRecord and DataMapper out of the box, for example.

The README is so good that there's little else to say. All you need to do is add attr_encrypted :attribute_name, :key => 'some key' lines to your models and you're most of the way there.

Post to Twitter Tweet This Post

Vaguely Related Posts (Usually)

2 Comment Responses to “attr_encrypted: Encrypts and Decrypts Your Attributes Transparently”

  1. #1
    Markus Jais Says:

    This is cool. Can't be any easier. It's small stuff like this, why I like Ruby and Rails so much.

  2. #2
    Paul Campbell Says:

    This is really great ... strange that it's taken so long for something so simple and useful to be done in such a straightforward way. ... but good!

Leave a Reply