HasSecureToken
Installation
Add this line to your application's Gemfile:
gem 'has_secure_token'
And then execute:
$ bundle
Or install it yourself as:
$ gem install has_secure_token
Setting your Model
class User < ActiveRecord::Base
has_secure_token :token1, :token2
end
user = User.create
user.token1 => "44539a6a59835a4ee9d7b112b48cd76e"
user.token2 => "226dd46af6be78953bde1641622497a8"
Contributing
- Fork it ( https://github.com/robertomiranda/has_secure_password/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
