They are prepended in JS-land anyway

Addresses @gondo's concern in #78.
This commit is contained in:
Samuel Cochran 2013-06-07 14:24:34 +08:00
parent a06f51d4bb
commit 44262f9862
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ module MailCatcher::Mail extend self
end
def messages
@messages_query ||= db.prepare "SELECT id, sender, recipients, subject, size, created_at FROM message ORDER BY created_at DESC"
@messages_query ||= db.prepare "SELECT id, sender, recipients, subject, size, created_at FROM message ORDER BY created_at ASC"
@messages_query.execute.map do |row|
Hash[row.fields.zip(row)].tap do |message|
message["recipients"] &&= ActiveSupport::JSON.decode message["recipients"]