diff --git a/app/controllers/authors_controller.rb b/app/controllers/authors_controller.rb index f4e6b80c7..bf88844b8 100644 --- a/app/controllers/authors_controller.rb +++ b/app/controllers/authors_controller.rb @@ -3,7 +3,7 @@ class AuthorsController < ApplicationController def show @author= Author.where(:id => params[:id]).first - @author_ostatus_posts = @author.ostatus_posts.paginate :page => params[:page], :order => 'created_at DESC' + @author_ostatus_posts = @author.ostatus_posts.paginate :page => params[:page], :order => 'published_at DESC' end diff --git a/app/controllers/dashboards_controller.rb b/app/controllers/dashboards_controller.rb index 414f5956a..fe09cfa5c 100644 --- a/app/controllers/dashboards_controller.rb +++ b/app/controllers/dashboards_controller.rb @@ -7,7 +7,7 @@ class DashboardsController < ApplicationController end def ostatus - @posts = OstatusPost.paginate :page => params[:page], :order => 'created_at DESC' + @posts = OstatusPost.paginate :page => params[:page], :order => 'published_at DESC' render :index end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2a9d7eda2..88a54e4c6 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -17,7 +17,11 @@ module ApplicationHelper end def how_long_ago(obj) - time_ago_in_words(obj.created_at) + " ago." + if obj.is_a? OstatusPost + "#{time_ago_in_words(obj.published_at)} ago" + else + "#{time_ago_in_words(obj.created_at)} ago." + end end def person_url(person)