Sha256: a5e7b6af0836b6281108be290d81ebd97f0a8ac7a0d0ee5c8786fbf17bb11e90
Contents?: true
Size: 1.85 KB
Versions: 2
Compression:
Stored size: 1.85 KB
Contents
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>RDoc Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body> <h2>File: README.rdoc</h2> <table> <tr><td>Path:</td><td>README.rdoc</td></tr> <tr><td>Modified:</td><td>Thu Aug 12 21:17:47 -0400 2010</td></tr> </table> <h1>auto_hash</h1> <p> A Ruby on Rails plugin to automate the cryptographic hashing of an activerecord field. </p> <p> UPDATE: auto_hash has quickly evolved to be a activerecord plugin that merely wraps the excellent bcrypt-ruby library. <a href="http://bcrypt-ruby.rubyforge.org">bcrypt-ruby.rubyforge.org</a> </p> <p> Works with both rails 2x and 3x </p> <p> WARNING: untested with ruby 1.9.2 at the moment. (Couldn‘t get rails 3x to work with ruby 1.9.2 - too early I guess) </p> <h3>Synopsis</h3> <pre> # In Model class User < ActiveRecord::Base auto_hash :password end # Elsewhere user = User.create(:email => "kevin@example.com", :password => "asdf") user.password #=> "$2a$10$0DvrQ.HMKRySMJrn0cGEM.AcesF82tkeBfNLTZTZ.VSWePihZD3mG" user.password == "asdf" # => true # works with updating fields also user = User.find_by_email("kevin@example.com") user.password = "better_password" user.password == "better_password" # => true </pre> <h3>Rails configuration (nothing unusual)</h3> <p> For rails 2x, in environment.rb </p> <pre> Rails::Initializer.run do |config| do config.gem "auto_hash" end </pre> <p> For rails 3x, in Gemfile </p> <pre> gem "auto_hash" </pre> <h3>Copyright</h3> <p> Copyright (c) 2010 Kevin Swope. See LICENSE for details. </p> <h2>Classes</h2> </body> </html> Files: 1 Classes: 0 Modules: 0 Methods: 0 Elapsed: 0.044s
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
auto_hash-0.3.1 | README.html |
auto_hash-0.3.0 | README.html |