posts are ordered by recent comment activity instead of time created

This commit is contained in:
danielvincent 2011-02-16 02:04:46 -05:00
parent e2ec4c0424
commit 41f077e039
2 changed files with 2 additions and 2 deletions

View file

@ -28,7 +28,7 @@ class AspectsController < ApplicationController
@posts = StatusMessage.joins(:aspects).where(:pending => false,
:aspects => {:id => @aspect_ids}).includes(:comments, :photos).select('DISTINCT `posts`.*').paginate(
:page => params[:page], :per_page => 15, :order => 'created_at DESC')
:page => params[:page], :per_page => 15, :order => 'updated_at DESC')
@fakes = PostsFake.new(@posts)
@contacts = current_user.contacts.includes(:person => :profile).where(:pending => false)

View file

@ -18,7 +18,7 @@ class Comment < ActiveRecord::Base
xml_attr :creator_signature
xml_attr :post_creator_signature
belongs_to :post
belongs_to :post, :touch => true
belongs_to :person
validates_presence_of :text, :post