https://github.com/johnvuko/jt-rails-generator-user
Generate a scaffold for user authentication in Ruby On Rails.
https://github.com/johnvuko/jt-rails-generator-user
Last synced: about 2 months ago
JSON representation
Generate a scaffold for user authentication in Ruby On Rails.
- Host: GitHub
- URL: https://github.com/johnvuko/jt-rails-generator-user
- Owner: johnvuko
- License: mit
- Created: 2015-07-02T12:14:02.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2018-09-09T12:28:50.000Z (almost 8 years ago)
- Last Synced: 2025-02-19T16:52:12.183Z (over 1 year ago)
- Language: Ruby
- Size: 18.6 KB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JTRailsGeneratorUser
[](http://badge.fury.io/rb/jt-rails-generator-user)
JTRailsGeneratorUser is a generator for user authentication. You have the login and sign up page and password forgot feature.
## Installation
JTRailsGeneratorUser is distributed as a gem, which is how it should be used in your app.
Include the gem in your Gemfile:
gem 'jt-rails-generator-user', '~> 1.0'
## Usage
You just have to use the generator with:
rails g jt:user
Include `CurrentUser` in your `ApplicationController`:
```ruby
class ApplicationController < ActionController::Base
include CurrentUser
...
end
```
## What's does it generate?
- `User` model with only email, password and password_token (for password forgot feature)
- `SessionController` for the login
- `UsersController` for the sign up and password forgot feature
- `UserMailer` for sending password reset instructions
- `CurrentUser` module which manage `current_user` variable and `require_user` filter
## Author
- [Jonathan VUKOVICH TRIBOUHARET](https://github.com/jonathantribouharet) ([@johnvuko](https://twitter.com/johnvuko))
## License
JTRailsGeneratorUser is released under the MIT license. See the LICENSE file for more info.