Merge branch 'master' into 3859-api-job-lock-method
[arvados.git] / services / api / app / mailers / admin_notifier.rb
index d86a2814abdeed9007ed7c9d52fbbbba03e9be7b..5dd36c047e5cf9dacb1dd5d859372def12fe19e9 100644 (file)
@@ -2,7 +2,6 @@ class AdminNotifier < ActionMailer::Base
   include AbstractController::Callbacks
 
   default from: Rails.configuration.admin_notifier_email_from
-  before_filter :load_variables
 
   def new_user(user)
     @user = user
@@ -12,11 +11,11 @@ class AdminNotifier < ActionMailer::Base
 
       add_to_subject = ''
       if Rails.configuration.auto_setup_new_users
-        add_to_subject = @user.is_invited ? 'and setup ' : ', but not setup '
+        add_to_subject = @user.is_invited ? ' and setup' : ', but not setup'
       end
 
       mail(to: @recipients,
-           subject: "#{Rails.configuration.email_subject_prefix}New user created #{add_to_subject}notification"
+           subject: "#{Rails.configuration.email_subject_prefix}New user created#{add_to_subject} notification"
           )
     end
   end
@@ -32,15 +31,4 @@ class AdminNotifier < ActionMailer::Base
     end
   end
 
-private
-  def load_variables
-    if Rails.configuration.respond_to?('workbench_address') and
-       not Rails.configuration.workbench_address.nil? and
-       not Rails.configuration.workbench_address.empty? then
-      @wb_address = Rails.configuration.workbench_address.sub(/\/$/,'') + '/users'
-    else
-      @wb_address = ''
-    end
-  end
-
 end