README.md in quo_vadis-1.0.0 vs README.md in quo_vadis-1.0.1
- old
+ new
@@ -31,10 +31,12 @@
* Offer so much flexibility that it takes more than 10 minutes to wrap your head around it (cf Devise, Authlogic).
## 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 and run `rails generate quo_vadis:install`.
Edit and run the generated migration to add authentication columns: `rake db:migrate`. Note the migration (currently) assumes you already have a `User` model.
In your `User` model, add `authenticates`:
@@ -45,17 +47,19 @@
Note Quo Vadis validates the presence of the password, but it's up to you to add any other validations you want.
Use `:authenticate` in a `before_filter` to protect your controllers' actions. For example:
- class ArticleController < ActionController::Base
+ class ArticlesController < ActionController::Base
before_filter :authenticate, :except => [:index, :show]
end
Write the sign-in view. Your sign-in form must:
* be in `app/views/sessions/new.html.:format`
* post the parameters `:username` and `:password` to `sign_in_url`
+
+You have to write the view yourself because you'd inevitably want to change whatever markup I generated for you.
In your layout, use `current_user` to retrieve the signed-in user, and `sign_in_path` and `sign_out_path` as appropriate.
## Customisation