diff --git a/app/controllers/admin/admin_users_controller.rb b/app/controllers/admin/admin_users_controller.rb index 17de2f97d..86ff97510 100644 --- a/app/controllers/admin/admin_users_controller.rb +++ b/app/controllers/admin/admin_users_controller.rb @@ -43,7 +43,7 @@ class Admin::AdminUsersController < AdminController def destroy if @admin_user.destroy flash[:notice] = I18n.t('record_deleted') - redirect_to admin_users_path + redirect_to admin_admin_users_path else flash.now[:alert] = I18n.t('failed_to_delete_record') render 'show' diff --git a/app/mailers/invoice_mailer.rb b/app/mailers/invoice_mailer.rb index 54c6a8605..c3eb20f6f 100644 --- a/app/mailers/invoice_mailer.rb +++ b/app/mailers/invoice_mailer.rb @@ -1,8 +1,9 @@ class InvoiceMailer < ApplicationMailer include Que::Mailer - def invoice_email(invoice_id, html) + def invoice_email(invoice_id, html, billing_email) @invoice = Invoice.find_by(id: invoice_id) + billing_email ||= @invoice.billing_email return unless @invoice return if whitelist_blocked?(@invoice.billing_email) @@ -11,6 +12,6 @@ class InvoiceMailer < ApplicationMailer invoice = @invoice attachments[invoice.pdf_name] = pdf - mail(to: format(invoice.billing_email), subject: invoice) + mail(to: format(billing_email), subject: invoice) end end diff --git a/app/models/invoice.rb b/app/models/invoice.rb index 0c4e23a08..8bc5137d5 100644 --- a/app/models/invoice.rb +++ b/app/models/invoice.rb @@ -117,7 +117,7 @@ class Invoice < ActiveRecord::Base return false unless valid? return false unless billing_email.present? - InvoiceMailer.invoice_email(id, html).deliver + InvoiceMailer.invoice_email(id, html, billing_email).deliver true end diff --git a/app/views/admin/registrars/show.haml b/app/views/admin/registrars/show.haml index c44523d87..728386f36 100644 --- a/app/views/admin/registrars/show.haml +++ b/app/views/admin/registrars/show.haml @@ -96,6 +96,10 @@ %tbody - @registrar.white_ips.each do |x| %tr - %td= link_to(x.ipv4, [:admin, @registrar, x]) - %td= link_to(x.ipv6, [:admin, @registrar, x]) + %td + - if x.ipv4.present? + = link_to(x.ipv4, [:admin, @registrar, x]) + %td + - x.ipv6.present? + = link_to(x.ipv6, [:admin, @registrar, x]) %td= x.interfaces.join(', ').upcase