lib/has_messages.rb in has_messages-0.4.0 vs lib/has_messages.rb in has_messages-0.4.1
- old
+ new
@@ -38,16 +38,16 @@
def has_messages
has_many :messages,
:as => :sender,
:class_name => 'Message',
:conditions => {:hidden_at => nil},
- :order => 'messages.created_at ASC'
+ :order => 'messages.created_at DESC'
has_many :received_messages,
:as => :receiver,
:class_name => 'MessageRecipient',
:include => :message,
:conditions => ['message_recipients.hidden_at IS NULL AND messages.state = ?', 'sent'],
- :order => 'messages.created_at ASC'
+ :order => 'messages.created_at DESC'
include HasMessages::InstanceMethods
end
end