diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index 2085730..deedb04 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -1,2 +1,3 @@ -

Home#index

-

Find me in app/views/home/index.html.erb

+
+

content

+
\ No newline at end of file diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 1603174..a8112a4 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -11,8 +11,20 @@ -

<%= notice %>

-

<%= alert %>

+
+

<%= notice %>

+

<%= alert %>

+
+
+ <% if current_user %> +

Signed in as <%=current_user.email%>

+ <% 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 + %> +
<%= yield %> diff --git a/config/environments/development.rb b/config/environments/development.rb index c44ba4b..5a7c287 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -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'], diff --git a/config/environments/production.rb b/config/environments/production.rb index d481240..e75861b 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -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 diff --git a/config/environments/test.rb b/config/environments/test.rb index 93ed4f1..6c47e4b 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -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