1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

Fix typo and filter info in readme.

This commit is contained in:
Carlos A. da Silva 2009-10-18 18:31:01 -02:00
parent 9a10709545
commit cce3f58e83

View file

@ -66,7 +66,7 @@ This line adds devise authenticable automatically for you inside your User class
# Include authenticable + recoverable # Include authenticable + recoverable
devise :recoverable devise :recoverable
# Include authenticable + conformable + recoverable + validatable # Include authenticable + confirmable + recoverable + validatable
devise :confirmable, :recoverable, :validatable devise :confirmable, :recoverable, :validatable
# Same as above, include all of them # Same as above, include all of them
@ -130,6 +130,10 @@ And to get the current signed in user this helper is available:
current_user current_user
You have also access to the session for this scope:
user_session
Devise let's you setup as many roles as you want, so let's say you already have this User model and also want an Admin model with the same authentication stuff, but not confirmation or password recovery. Just follow the same steps: Devise let's you setup as many roles as you want, so let's say you already have this User model and also want an Admin model with the same authentication stuff, but not confirmation or password recovery. Just follow the same steps:
# Create a migration with the required fields # Create a migration with the required fields
@ -144,11 +148,12 @@ Devise let's you setup as many roles as you want, so let's say you already have
map.devise_for :admin map.devise_for :admin
# Inside your protected controller # Inside your protected controller
before_filter :sign_in_admin! before_filter :authenticate_admin!
# Inside your controllers and views # Inside your controllers and views
admin_signed_in? admin_signed_in?
current_admin current_admin
admin_session
== TODO == TODO