1
0
Fork 0
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:
Brent Kearney 2014-05-23 12:26:19 -06:00
parent 9818038a72
commit 0e14ac3aa7

View file

@ -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