@@ -266,7 +266,7 class Mailer < ActionMailer::Base | |||||
266 | # Mailer.account_activation_request(user).deliver => sends an email to all active administrators |
|
266 | # Mailer.account_activation_request(user).deliver => sends an email to all active administrators | |
267 | def account_activation_request(user) |
|
267 | def account_activation_request(user) | |
268 | # Send the email to all active administrators |
|
268 | # Send the email to all active administrators | |
269 |
recipients = User.active.where(:admin => true). |
|
269 | recipients = User.active.where(:admin => true).collect { |u| u.mail }.compact | |
270 | @user = user |
|
270 | @user = user | |
271 | @url = url_for(:controller => 'users', :action => 'index', |
|
271 | @url = url_for(:controller => 'users', :action => 'index', | |
272 | :status => User::STATUS_REGISTERED, |
|
272 | :status => User::STATUS_REGISTERED, | |
@@ -330,8 +330,8 class Mailer < ActionMailer::Base | |||||
330 | scope = scope.where(:assigned_to_id => user_ids) if user_ids.present? |
|
330 | scope = scope.where(:assigned_to_id => user_ids) if user_ids.present? | |
331 | scope = scope.where(:project_id => project.id) if project |
|
331 | scope = scope.where(:project_id => project.id) if project | |
332 | scope = scope.where(:tracker_id => tracker.id) if tracker |
|
332 | scope = scope.where(:tracker_id => tracker.id) if tracker | |
333 |
|
333 | issues_by_assignee = scope.includes(:status, :assigned_to, :project, :tracker). | ||
334 | issues_by_assignee = scope.includes(:status, :assigned_to, :project, :tracker).all.group_by(&:assigned_to) |
|
334 | group_by(&:assigned_to) | |
335 | issues_by_assignee.keys.each do |assignee| |
|
335 | issues_by_assignee.keys.each do |assignee| | |
336 | if assignee.is_a?(Group) |
|
336 | if assignee.is_a?(Group) | |
337 | assignee.users.each do |user| |
|
337 | assignee.users.each do |user| |
General Comments 0
You need to be logged in to leave comments.
Login now