class Message < ActiveRecord::Base
  has_many :recipients

  validates :postfix_queue_id, presence: true

  def decode_log
    parser = Parser::MailLog.new
    parser.parse_log
  end
end

class Message < ActiveRecord::Base
  has_many :recipients

  validates :postfix_queue_id, presence: true

  def decode_log
    parser = Parser::MailLog.new Rails.root.join('log', 'mail.log')
    parser.parse_log
  end
end

Add path to log file
Add path to log file
