diff options
-rw-r--r-- | app/models/mailer.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/mailer.rb b/app/models/mailer.rb index c6becfdd4..a7cdd4c2e 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -266,7 +266,7 @@ class Mailer < ActionMailer::Base # Mailer.account_activation_request(user).deliver => sends an email to all active administrators def account_activation_request(user) # Send the email to all active administrators - recipients = User.active.where(:admin => true).all.collect { |u| u.mail }.compact + recipients = User.active.where(:admin => true).collect { |u| u.mail }.compact @user = user @url = url_for(:controller => 'users', :action => 'index', :status => User::STATUS_REGISTERED, @@ -330,8 +330,8 @@ class Mailer < ActionMailer::Base scope = scope.where(:assigned_to_id => user_ids) if user_ids.present? scope = scope.where(:project_id => project.id) if project scope = scope.where(:tracker_id => tracker.id) if tracker - - issues_by_assignee = scope.includes(:status, :assigned_to, :project, :tracker).all.group_by(&:assigned_to) + issues_by_assignee = scope.includes(:status, :assigned_to, :project, :tracker). + group_by(&:assigned_to) issues_by_assignee.keys.each do |assignee| if assignee.is_a?(Group) assignee.users.each do |user| |