diff --git a/app/models/registration.rb b/app/models/registration.rb index 3906f558..d220e49f 100644 --- a/app/models/registration.rb +++ b/app/models/registration.rb @@ -69,7 +69,7 @@ class Registration < ApplicationRecord def send_registration_mail if conference.email_settings.send_on_registration? - Mailbot.registration_mail(conference, user).deliver_later + Mailbot.registration_mail(conference, user).deliver_now end end diff --git a/app/views/layouts/_mailbot_footer.html.erb b/app/views/layouts/_mailbot_footer.html.erb index fe304c9d..4f479cc7 100644 --- a/app/views/layouts/_mailbot_footer.html.erb +++ b/app/views/layouts/_mailbot_footer.html.erb @@ -7,6 +7,8 @@ <%= stylesheet_link_tag "mailbot" %> + +
\ No newline at end of file diff --git a/app/views/layouts/_mailbot_footer.html.haml b/app/views/layouts/_mailbot_footer.html.haml deleted file mode 100644 index f086135d..00000000 --- a/app/views/layouts/_mailbot_footer.html.haml +++ /dev/null @@ -1,9 +0,0 @@ -%html{lang: 'en'} - %head - %meta{charset: 'utf-8'} - %meta{name: 'viewport', content: 'width=device-width, initial-scale=1'} - %meta{content: 'Snap!Con -- A conference all about Snap!, a programing language from UC Berkeley.', name: 'description'} - %meta{content: 'Michael Ball, Brian Harvey, Jens Moenig, Bernat Romagosa, Dan Garcia, Lauren Mock', name: 'author'} - = stylesheet_link_tag "mailbot" - %body - #border \ No newline at end of file diff --git a/app/views/layouts/_mailbot_header.html.erb b/app/views/layouts/_mailbot_header.html.erb index cc968b80..0c29963f 100644 --- a/app/views/layouts/_mailbot_header.html.erb +++ b/app/views/layouts/_mailbot_header.html.erb @@ -24,8 +24,6 @@
-
- - + \ No newline at end of file diff --git a/app/views/layouts/_mailbot_header.html.haml b/app/views/layouts/_mailbot_header.html.haml deleted file mode 100644 index 1492a469..00000000 --- a/app/views/layouts/_mailbot_header.html.haml +++ /dev/null @@ -1,19 +0,0 @@ -%html{lang: 'en'} - %head - %meta{charset: 'utf-8'} - %meta{name: 'viewport', content: 'width=device-width, initial-scale=1'} - %title= 'Email' - %meta{content: 'Snap!Con -- A conference all about Snap!, a programing language from UC Berkeley.', name: 'description'} - %meta{content: 'Michael Ball, Brian Harvey, Jens Moenig, Bernat Romagosa, Dan Garcia, Lauren Mock', name: 'author'} - = stylesheet_link_tag "mailbot" - %body - #border - .row - .col-md-2 - - if !@logo.nil? - = image_tag(@logo, style: "display:block") - .col-md-10 - %h1 - #content - %span{:style => "white-space: pre-line"} - \ No newline at end of file diff --git a/app/views/mailbot/email_template.html.erb b/app/views/mailbot/email_template.html.erb index 41e0b0e6..fd8ae362 100644 --- a/app/views/mailbot/email_template.html.erb +++ b/app/views/mailbot/email_template.html.erb @@ -1,5 +1,5 @@ -<%= render "layouts/_mailbot_header" %> - <%= @email_body %> -<% end %> -<%= render "layouts/_mailbot_footer" %> - \ No newline at end of file +<%= render partial: "layouts/mailbot_header" %> + + <%= @email_body %> + +<%= render partial: "layouts/mailbot_footer" %> \ No newline at end of file diff --git a/config/environments/development.rb b/config/environments/development.rb index 6f2a1042..12119595 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -114,4 +114,5 @@ Osem::Application.configure do end end + config.assets.precompile += ['mailbot.css'] end