mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Updated Getting Started instructions to help avoid confusion around alternate devise MODEL names
This commit is contained in:
parent
9818038a72
commit
0e14ac3aa7
1 changed files with 3 additions and 1 deletions
|
@ -122,12 +122,14 @@ You should restart your application after changing Devise's configuration option
|
|||
|
||||
### Controller filters and helpers
|
||||
|
||||
Devise will create some helpers to use inside your controllers and views. To set up a controller with user authentication, just add this before_action:
|
||||
Devise will create some helpers to use inside your controllers and views. To set up a controller with user authentication, just add this before_action (assuming your devise model is 'User'):
|
||||
|
||||
```ruby
|
||||
before_action :authenticate_user!
|
||||
```
|
||||
|
||||
If your devise MODEL is something other than User, replace "_user" with "_yourmodel". The same logic applies to the instructions below.
|
||||
|
||||
To verify if a user is signed in, use the following helper:
|
||||
|
||||
```ruby
|
||||
|
|
Loading…
Add table
Reference in a new issue