code layout cleanup app/models/mail_handler.rb

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8744 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2012-01-31 10:19:04 +00:00
parent bcef0de43b
commit 7b600cdb91
1 changed files with 4 additions and 2 deletions

View File

@ -226,7 +226,8 @@ class MailHandler < ActionMailer::Base
@keywords[attr]
else
@keywords[attr] = begin
if (options[:override] || @@handler_options[:allow_override].include?(attr.to_s)) && (v = extract_keyword!(plain_text_body, attr, options[:format]))
if (options[:override] || @@handler_options[:allow_override].include?(attr.to_s)) &&
(v = extract_keyword!(plain_text_body, attr, options[:format]))
v
elsif !@@handler_options[:issue][attr].blank?
@@handler_options[:issue][attr]
@ -269,7 +270,8 @@ class MailHandler < ActionMailer::Base
'priority_id' => (k = get_keyword(:priority)) && IssuePriority.named(k).first.try(:id),
'category_id' => (k = get_keyword(:category)) && issue.project.issue_categories.named(k).first.try(:id),
'assigned_to_id' => assigned_to.try(:id),
'fixed_version_id' => (k = get_keyword(:fixed_version, :override => true)) && issue.project.shared_versions.named(k).first.try(:id),
'fixed_version_id' => (k = get_keyword(:fixed_version, :override => true)) &&
issue.project.shared_versions.named(k).first.try(:id),
'start_date' => get_keyword(:start_date, :override => true, :format => '\d{4}-\d{2}-\d{2}'),
'due_date' => get_keyword(:due_date, :override => true, :format => '\d{4}-\d{2}-\d{2}'),
'estimated_hours' => get_keyword(:estimated_hours, :override => true),