Commit 41f077e0 authored by danielvincent's avatar danielvincent

posts are ordered by recent comment activity instead of time created

parent e2ec4c04
......@@ -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)
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment