Permalink
Browse files

forgot to move sort into Message class as well

  • Loading branch information...
1 parent 84224a0 commit 11d52936555b198f95bb257af0859409f5053442 @ryanb committed Oct 1, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/letter_opener/delivery_method.rb
  2. +1 −1 lib/letter_opener/message.rb
@@ -9,7 +9,7 @@ def initialize(options = {})
def deliver!(mail)
location = File.join(settings[:location], "#{Time.now.to_i}_#{Digest::SHA1.hexdigest(mail.encoded)[0..6]}")
messages = Message.rendered_messages(location, mail)
- Launchy.open(URI.parse(URI.escape(messages.sort.first.filepath)))
+ Launchy.open(URI.parse(URI.escape(messages.first.filepath)))
end
end
end
@@ -6,7 +6,7 @@ def self.rendered_messages(location, mail)
messages = mail.parts.map { |part| new(location, mail, part) }
messages << new(location, mail) if messages.empty?
messages.each(&:render)
- messages
+ messages.sort
end
def initialize(location, mail, part = nil)

0 comments on commit 11d5293

Please sign in to comment.