JTRailsGeneratorUser
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:
class ApplicationController < ActionController::Base
include CurrentUser
...
endWhat's does it generate?
-
Usermodel with only email, password and password_token (for password forgot feature) -
SessionControllerfor the login -
UsersControllerfor the sign up and password forgot feature -
UserMailerfor sending password reset instructions -
CurrentUsermodule which managecurrent_uservariable andrequire_userfilter
Author
License
JTRailsGeneratorUser is released under the MIT license. See the LICENSE file for more info.