This commit is contained in:
jane 2021-11-13 20:10:25 -05:00
parent 1e2aecc21c
commit ab8412772e
5 changed files with 40 additions and 5 deletions

View file

@ -1,2 +1,3 @@
<h1>Home#index</h1>
<p>Find me in app/views/home/index.html.erb</p>
<div class="content">
<p> content </p>
</div>

View file

@ -11,8 +11,20 @@
</head>
<body>
<p class="notice"><%= notice %></p>
<p class="alert"><%= alert %></p>
<div class="notification" style="display: flex; align-items: flex-start; justify-content: flex-start;">
<p class="notice"><%= notice %></p>
<p class="alert"><%= alert %></p>
</div>
<div class="user" style="display: flex; align-items: flex-start; justify-content: flex-end;">
<% if current_user %>
<h4 style="margin: 0; margin-right: 4px;">Signed in as <%=current_user.email%></h4>
<% end %>
<%=
link_to_if(current_user.nil?, "Login", new_user_session_path, class: 'btn btn-primary m-5') do
link_to('Sign out', destroy_user_session_path, :method => 'delete', class: 'btn btn-danger m-5')
end
%>
</div>
<%= yield %>
</body>
</html>

View file

@ -76,7 +76,7 @@ Rails.application.configure do
# Uncomment if you wish to allow Action Cable access from any origin.
# config.action_cable.disable_request_forgery_protection = true
config.action_mailer.default_url_options = {host: 'localhost', port: 3000}
config.action_mailer.default_url_options = {host: 'dev.j4.pm'}
config.action_mailer.smtp_settings = {
address: ENV['MAILER_ADDRESS'],

View file

@ -117,4 +117,15 @@ Rails.application.configure do
# config.active_record.database_selector = { delay: 2.seconds }
# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
config.action_mailer.default_url_options = {host: 'UNSET.j4.pm'}
config.action_mailer.smtp_settings = {
address: ENV['MAILER_ADDRESS'],
port: 587,
domain: ENV['MAILER_DOMAIN'],
user_name: ENV['MAILER_USERNAME'],
password: ENV['MAILER_PASSWORD'],
authentication: 'plain',
enable_starttls_auto: true,
}
end

View file

@ -57,4 +57,15 @@ Rails.application.configure do
# Annotate rendered view with file names.
# config.action_view.annotate_rendered_view_with_filenames = true
config.action_mailer.default_url_options = {host: 'dev.j4.pm'}
config.action_mailer.smtp_settings = {
address: ENV['MAILER_ADDRESS'],
port: 587,
domain: ENV['MAILER_DOMAIN'],
user_name: ENV['MAILER_USERNAME'],
password: ENV['MAILER_PASSWORD'],
authentication: 'plain',
enable_starttls_auto: true,
}
end