Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- gem 'devise' --> authorization and authentication
- Authentication
- -logged into the system enables you to do functionalities in the system
- Authenticated
- -are you authorized to do A, B or C
- -administrator of system or viewer of data
- User
- email (string)
- enrcypted_password (string)
- Authorization
- rails generate devise:install
- -migration file for model called user.rb
- -what makes this unique is it makes user with email and encrypted password
- rails generate model User
- before_filter :authenticate_user! -- put inside controller
- Controller_authentication
- -before filter
- View authentication
- -user_signed_in?
- 1. rails g devise User
- 2. authenticate controller by adding before filter
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement