[ARVADOS] updated: a805395a2a64aa83a1604ade6932151a0846b577

git at public.curoverse.com git at public.curoverse.com
Thu Sep 25 19:48:03 EDT 2014


Summary of changes:
 services/api/app/mailers/admin_notifier.rb                   | 12 ------------
 .../api/app/views/admin_notifier/new_inactive_user.text.erb  |  4 ++--
 services/api/app/views/admin_notifier/new_user.text.erb      |  4 ++--
 3 files changed, 4 insertions(+), 16 deletions(-)

       via  a805395a2a64aa83a1604ade6932151a0846b577 (commit)
      from  48d04722a5e0478e22be33f58036806a55b3a0eb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit a805395a2a64aa83a1604ade6932151a0846b577
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Sep 25 19:46:08 2014 -0400

    3991: Fix config checks in admin_notifier.

diff --git a/services/api/app/mailers/admin_notifier.rb b/services/api/app/mailers/admin_notifier.rb
index 36798be..5dd36c0 100644
--- a/services/api/app/mailers/admin_notifier.rb
+++ b/services/api/app/mailers/admin_notifier.rb
@@ -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
@@ -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
diff --git a/services/api/app/views/admin_notifier/new_inactive_user.text.erb b/services/api/app/views/admin_notifier/new_inactive_user.text.erb
index 2e9e01d..53a2b98 100644
--- a/services/api/app/views/admin_notifier/new_inactive_user.text.erb
+++ b/services/api/app/views/admin_notifier/new_inactive_user.text.erb
@@ -3,10 +3,10 @@ A new user landed on the inactive user page:
 
   <%= @user.full_name %> <<%= @user.email %>>
 
-<% if not @wb_address.empty? -%>
+<% if Rails.configuration.workbench_address -%>
 Please see workbench for more information:
 
-  <%= @wb_address %>
+  <%= Rails.configuration.workbench_address %>
 
 <% end -%>
 Thanks,
diff --git a/services/api/app/views/admin_notifier/new_user.text.erb b/services/api/app/views/admin_notifier/new_user.text.erb
index 1df9fd6..88ecbe3 100644
--- a/services/api/app/views/admin_notifier/new_user.text.erb
+++ b/services/api/app/views/admin_notifier/new_user.text.erb
@@ -10,10 +10,10 @@ A new user has been created<%=add_to_message%>:
 
 This user is <%= @user.is_active ? '' : 'NOT ' %>active.
 
-<% if not @wb_address.empty? -%>
+<% if Rails.configuration.workbench_address -%>
 Please see workbench for more information:
 
-  <%= @wb_address %>
+  <%= Rails.configuration.workbench_address %>
 
 <% end -%>
 Thanks,

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list