diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2012-10-10 11:31:32 +1100 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2012-10-10 11:31:32 +1100 |
commit | 131fe6497f319e42ff83f9b3f830c532f46f6c02 (patch) | |
tree | a37b345ded8582e151ce3536d36c0c16918c788b | |
parent | 6d2f1827be67cdad23901d6049a02ef6d9ac81e7 (diff) |
Simplify creation of log line
-rw-r--r-- | app/models/exim_log.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/app/models/exim_log.rb b/app/models/exim_log.rb index 6d508b7a6..316f6771c 100644 --- a/app/models/exim_log.rb +++ b/app/models/exim_log.rb @@ -68,12 +68,7 @@ class EximLog < ActiveRecord::Base for email in emails info_request = InfoRequest.find_by_incoming_email(email) if info_request - exim_log = EximLog.new - exim_log.info_request = info_request - exim_log.exim_log_done = done - exim_log.line = line - exim_log.order = order - exim_log.save! + info_request.exim_logs.create!(:line => line, :order => order, :exim_log_done => done) else puts "Warning: Could not find request with email #{email}" end |