Configuration
You will need to create a user model, define routes, include concerns, and you may want to alter some of the default settings for this gem. Run the following command for an easy one-step installation:
or for Mongoid
Example:
This generator accepts the following optional arguments:
Argument
Default
Description
USER_CLASS
User
The name of the class to use for user authentication.
MOUNT_PATH
auth
The following events will take place when using the install generator:
An initializer will be created at
config/initializers/devise_token_auth.rb
. Read more.A model will be created in the
app/models
directory. If the model already exists, a concern (and fields forMongoid
) will be included at the file. Read more.Routes will be appended to file at
config/routes.rb
. Read more.A concern will be included by your application controller at
app/controllers/application_controller.rb
. Read more.For
ActiveRecord
a migration file will be created in thedb/migrate
directory. Inspect the migrations file, add additional columns if necessary, and then run the migration:
You may also need to configure the following items:
Last updated