Closed dacur closed 5 years ago
We do set up the mailer, and with #121 we'll have flash messages. Do you know what the other two are?
Some setup you must do manually if you haven't yet:
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.
2. Ensure you have defined root_url to *something* in your config/routes.rb.
For example:
root to: "home#index"
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>
4. You can copy Devise views (for customization) to your app by running:
rails g devise:views
From here.
One is optional (views), the other is setting up root
, which I think you already do (home#page
maybe?).
Yeah, 1 is done. 2 is done. 3 will be done in #101. 4 is not something we'll do.
sounds good 👍
When you install devise, there are a few instructions (I think 4) that are printed to the terminal. One is mentioned in the docs - setting up a default mailer URL (
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
). I believe another is setting upalert
andnotice
in your views (potentially inapp/views/layouts/application.html.erb
.Do we handle setting up those four items? If not, should we?