README.md in clearance-1.3.0 vs README.md in clearance-1.4.0
- old
+ new
@@ -1,11 +1,10 @@
Clearance
=========
[![Build Status](https://secure.travis-ci.org/thoughtbot/clearance.png)](http://travis-ci.org/thoughtbot/clearance?branch=master)
[![Code Climate](https://codeclimate.com/github/thoughtbot/clearance.png)](https://codeclimate.com/github/thoughtbot/clearance)
-[![Dependency Status](https://gemnasium.com/thoughtbot/clearance.png)](https://gemnasium.com/thoughtbot/clearance)
Rails authentication with email & password.
Clearance was extracted out of [Airbrake](http://airbrake.io/). It is intended
to be small, simple, and well-tested. It is intended to be easy to override
@@ -78,11 +77,11 @@
helpers. For example:
```haml
- if signed_in?
= current_user.email
- = link_to 'Sign out', sign_out_path, method: :delete
+ = button_to 'Sign out', sign_out_path, method: :delete
- else
= link_to 'Sign in', sign_in_path
```
To authenticate a user elsewhere than `sessions/new` (like in an API):
@@ -172,10 +171,12 @@
class PasswordsController < Clearance::PasswordsController
class SessionsController < Clearance::SessionsController
class UsersController < Clearance::UsersController
```
+Don't forget to override routes to your new controllers!
+
Then, override public methods:
passwords#create
passwords#edit
passwords#new
@@ -202,9 +203,10 @@
sessions#url_after_create
sessions#url_after_destroy
users#flash_failure_after_create
users#url_after_create
users#user_from_params
+ users#user_params
All of these controller methods redirect to `'/'` by default:
passwords#url_after_update
sessions#url_after_create