https://github.com/heartcombo/devise-encryptable
Devise encryptable behavior since v2.1
https://github.com/heartcombo/devise-encryptable
Last synced: 6 months ago
JSON representation
Devise encryptable behavior since v2.1
- Host: GitHub
- URL: https://github.com/heartcombo/devise-encryptable
- Owner: heartcombo
- License: apache-2.0
- Created: 2012-05-07T13:56:18.000Z (over 13 years ago)
- Default Branch: main
- Last Pushed: 2024-04-09T19:59:15.000Z (almost 2 years ago)
- Last Synced: 2025-06-25T02:49:08.193Z (7 months ago)
- Language: Ruby
- Size: 83 KB
- Stars: 120
- Watchers: 14
- Forks: 59
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: Changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# Devise Encryptable
Use alternative (and even your own!) encryptors with Devise.
## Usage
Add it to your Gemfile
```ruby
gem "devise-encryptable"
```
Add the `encryptable` module to your model:
```ruby
class User < ActiveRecord::Base
devise :database_authenticatable, :encryptable
end
```
And add the `password_salt` field to the database through a migration:
```ruby
class DeviseCreateUsers < ActiveRecord::Migration
def change
add_column :users, :password_salt, :string
end
end
```
And you're ready to go!
## Contributing
* Fork it
* Write your changes
* Commit
* Send a pull request
## License
Apache License version 2. Copyright 2020-2024 Rafael França, Carlos Antônio da Silva. Copyright 2012-2019 Plataformatec.