Guest User

Untitled

a guest
Feb 21st, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. FixieVerifications
  2. ==================
  3.  
  4. Easily add emailed verification to your application.
  5.  
  6.  
  7. Example
  8. =======
  9.  
  10. class User < ActiveRecord::Base
  11. has_verification_number
  12. end
  13.  
  14. u = User.create
  15. u.needs_verification! # Pretend the emailed code is 12345
  16.  
  17. # Either of these work
  18. Verification.verify! "12345"
  19. u.verify! "12345"
  20.  
  21. u.verified? # returns true
  22.  
  23. Copyright (c) 2008 Joe Van Dyk, Fixie, released under the MIT license
Add Comment
Please, Sign In to add comment