Permalink
Browse files

example usage

  • Loading branch information...
grosser committed Aug 30, 2009
1 parent c78271d commit 5e167e19a75fc1ba1c029e33a56e82bf4d321f2b
Showing with 7 additions and 0 deletions.
  1. +7 −0 README.markdown
View
@@ -12,6 +12,13 @@ Usage
=====
ReadableRandom.get(5) -> 'aB23r'
+ # user.rb
+ def generate_token
+ while token.blank? or User.find_by_token(token)
+ self.token = ReadableRandom.get(6)
+ end
+ end
+
TODO
====
- prevent nasty words by not using vovels or a more clever tick...

0 comments on commit 5e167e1

Please sign in to comment.