posts are ordered by recent comment activity instead of time created
This commit is contained in:
parent
e2ec4c0424
commit
41f077e039
2 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue