mirror of
https://github.com/heartcombo/devise.git
synced 2026-02-19 02:44:31 -05:00
* doc: Add some additional details concerning using devise in an API-only Rails application * Apply wording suggestions from code review Co-Authored-By: Marcos Ferreira <mracos@users.noreply.github.com> * Apply suggestions from code review Co-Authored-By: Marcos Ferreira <mracos@users.noreply.github.com>
37 lines
1.2 KiB
Plaintext
37 lines
1.2 KiB
Plaintext
===============================================================================
|
|
|
|
Depending on your application's configuration some manual setup may be required:
|
|
|
|
1. Ensure you have defined default url options in your environments files. Here
|
|
is an example of default_url_options appropriate for a development environment
|
|
in config/environments/development.rb:
|
|
|
|
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
|
|
|
|
In production, :host should be set to the actual host of your application.
|
|
|
|
* Required for all applications. *
|
|
|
|
2. Ensure you have defined root_url to *something* in your config/routes.rb.
|
|
For example:
|
|
|
|
root to: "home#index"
|
|
|
|
* Not required for API-only Applications *
|
|
|
|
3. Ensure you have flash messages in app/views/layouts/application.html.erb.
|
|
For example:
|
|
|
|
<p class="notice"><%= notice %></p>
|
|
<p class="alert"><%= alert %></p>
|
|
|
|
* Not required for API-only Applications *
|
|
|
|
4. You can copy Devise views (for customization) to your app by running:
|
|
|
|
rails g devise:views
|
|
|
|
* Not required *
|
|
|
|
===============================================================================
|