README.md in quo_vadis-1.0.7 vs README.md in quo_vadis-1.1.0
- old
+ new
@@ -10,18 +10,18 @@
* No surprises: it does what you expect.
* Easy to customise.
* Uses BCrypt to encrypt passwords.
* Sign in, sign out, forgotten password, authenticate actions, remember user between browser sessions.
* Block accounts.
+* Let you choose which model(s) to authenticate (defaults to `User`).
Forthcoming features:
* Generate the views for you (for now, copy the examples given below).
-* Let you choose which model(s) to authenticate (currently `User`).
* Let you choose the identification field (currently `username`).
* HTTP basic/digest authentication (probably).
-* Generate (User) model plus migration if it doesn't exist.
+* Generate model plus migration if it doesn't exist.
* Detect presence of `has_secure_password` (see below) and adapt appropriately.
What it doesn't and won't do:
* Authorisation.
@@ -35,15 +35,15 @@
## Quick Start
If this takes you more than 5 minutes, you can have your money back ;)
-Install and run the generator: add `gem 'quo_vadis'` to your Gemfile, run `bundle install`, then `rails generate quo_vadis:install`.
+Install and run the generator: add `gem 'quo_vadis'` to your Gemfile, run `bundle install`, then `rails generate quo_vadis:install [MODEL_NAME]` (where model name is optional and defaults to `User`).
-Edit and run the generated migration to add the authentication columns: `rake db:migrate`. Note the migration (currently) assumes you already have a `User` model.
+Edit and run the generated migration to add the authentication columns: `rake db:migrate`. Note the migration (currently) assumes you already have a table for your model.
-In your `User` model, add `authenticates`:
+In your `User` (or whichever) model, add `authenticates`:
class User < ActiveRecord::Base
authenticates
end
@@ -111,9 +111,11 @@
You can customise the flash messages and mailer from/subject in `config/locales/quo_vadis.en.yml`.
You can customise the sign-in and sign-out redirects in `config/initializers/quo_vadis.rb`; they both default to the root route. You can also hook into the sign-in and sign-out process if you need to run any other code.
If you want to add other session management type features, go right ahead: create a `SessionsController` as normal and carry on.
+
+You can skip the validation of authentication attributes (password etc) by overriding `should_authenticate?` in your model. Perhaps only some of the users should be able to sign in, so you don't want to force them to have a password.
## Sign up / user registration
Quo Vadis doesn't offer sign-up because that's user management, not authentication.