Skip to content
Browse files

Revert "Commented-on posts bubble up to the top"

This reverts commit 6da4100.
  • Loading branch information...
1 parent 308c653 commit 119599bfebe7eae7b2fd25b75cc702ca0b8b2769 @maxwell maxwell committed Dec 2, 2010
View
4 app/controllers/aspects_controller.rb
@@ -9,7 +9,7 @@ class AspectsController < ApplicationController
respond_to :json, :only => :show
def index
- @posts = current_user.raw_visible_posts.find_all_by__type("StatusMessage", :order => 'updated_at desc').paginate :page => params[:page], :per_page => 15
+ @posts = current_user.visible_posts(:_type => "StatusMessage").paginate :page => params[:page], :per_page => 15, :order => 'created_at DESC'
@post_hashes = hashes_for_posts @posts
@aspect_hashes = hashes_for_aspects @aspects.all, @contacts
@aspect = :all
@@ -62,7 +62,7 @@ def show
@aspect_contacts = @aspect.contacts
@aspect_contacts_count = @aspect_contacts.count
- @posts = @aspect.posts.find_all_by__type("StatusMessage", :order => 'updated_at desc').paginate :page => params[:page], :per_page => 15
+ @posts = @aspect.posts.find_all_by__type("StatusMessage", :order => 'created_at desc').paginate :page => params[:page], :per_page => 15
@post_hashes = hashes_for_posts @posts
@post_count = @posts.count
View
4 app/controllers/people_controller.rb
@@ -11,7 +11,7 @@ class PeopleController < ApplicationController
def index
@aspect = :search
- @people = Person.search(params[:q]).paginate :page => params[:page], :per_page => 25, :order => 'updated_at DESC'
+ @people = Person.search(params[:q]).paginate :page => params[:page], :per_page => 25, :order => 'created_at DESC'
@requests = Request.all(:to_id.in => @people.map{|p| p.id})
#only do it if it is an email address
@@ -39,7 +39,7 @@ def show
@aspects_with_person = @contact.aspects
end
- @posts = current_user.visible_posts(:person_id => @person.id, :_type => "StatusMessage").paginate :page => params[:page], :order => 'updated_at DESC'
+ @posts = current_user.visible_posts(:person_id => @person.id, :_type => "StatusMessage").paginate :page => params[:page], :order => 'created_at DESC'
@post_hashes = hashes_for_posts @posts
respond_with @person, :locals => {:post_type => :all}
View
2 app/controllers/photos_controller.rb
@@ -21,7 +21,7 @@ def index
@aspects_with_person = @contact.aspects
end
- @posts = current_user.raw_visible_posts.all(:_type => 'Photo', :person_id => @person.id, :order => 'updated_at DESC').paginate :page => params[:page], :order => 'created_at DESC'
+ @posts = current_user.raw_visible_posts.all(:_type => 'Photo', :person_id => @person.id, :order => 'created_at DESC').paginate :page => params[:page], :order => 'created_at DESC'
render 'people/show'
View
5 app/models/comment.rb
@@ -36,11 +36,6 @@ class Comment
validates_presence_of :text, :diaspora_handle, :post
validates_with HandleValidator
- after_create do
- #save the parent post to update updated_at timestamp
- post.save
- end
-
before_save do
get_youtube_title text
end
View
9 spec/models/comment_spec.rb
@@ -70,15 +70,6 @@
user2.comment "sup dog", :on => @status
@status.reload.comments.first.text.should == "sup dog"
end
-
- it "updates updated_at of parent post on creation" do
- hash = @status.to_mongo
- hash[:updated_at] = (Time.now - 20).to_s
- @status.collection.save(hash)
- user2.comment "sup dog", :on => @status
- @status.reload.updated_at.should == @status.comments.first.created_at
- end
-
end
it 'should not send out comments when we have no people' do

0 comments on commit 119599b

Please sign in to comment.
Something went wrong with that request. Please try again.