Improve method naming

pull/3254/head
Alexander Bach 9 years ago
parent 36d8bf8e42
commit cd1a3e4a7b
  1. 8
      app/models/journal_notification_mailer.rb

@ -32,14 +32,14 @@ class JournalNotificationMailer
def distinguish_journals(journal, send_notification)
if send_notification
if journal.journable_type == 'WorkPackage' && journal.initial?
handle_create(journal.journable)
handle_work_package_create(journal.journable)
elsif journal.journable_type == 'WorkPackage'
handle_update(journal)
handle_work_package_update(journal)
end
end
end
def handle_create(work_package)
def handle_work_package_create(work_package)
if Setting.notified_events.include?('work_package_added')
recipients = work_package.recipients + work_package.watcher_recipients
users = User.find_all_by_mails(recipients.uniq)
@ -52,7 +52,7 @@ class JournalNotificationMailer
end
end
def handle_update(journal)
def handle_work_package_update(journal)
if send_update_notification?(journal)
issue = journal.journable
recipients = issue.recipients + issue.watcher_recipients

Loading…
Cancel
Save