DG IZ; time_created_at uses published_at instead of created_at for OstatusPost
This commit is contained in:
parent
f191aef981
commit
3eeb81ad34
3 changed files with 7 additions and 3 deletions
|
|
@ -3,7 +3,7 @@ class AuthorsController < ApplicationController
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@author= Author.where(:id => params[:id]).first
|
@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
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ class DashboardsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def ostatus
|
def ostatus
|
||||||
@posts = OstatusPost.paginate :page => params[:page], :order => 'created_at DESC'
|
@posts = OstatusPost.paginate :page => params[:page], :order => 'published_at DESC'
|
||||||
render :index
|
render :index
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,11 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def how_long_ago(obj)
|
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
|
end
|
||||||
|
|
||||||
def person_url(person)
|
def person_url(person)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue