Use local time for rollups
This commit is contained in:
@@ -20,7 +20,7 @@ class Bubble::Thread::Rollup
|
||||
private
|
||||
attr_reader :thread, :entries, :first_position
|
||||
|
||||
delegate :time_ago_in_words, to: "ApplicationController.helpers", private: true
|
||||
delegate :local_time_ago, to: "ApplicationController.helpers", private: true
|
||||
|
||||
def first_position?
|
||||
first_position
|
||||
@@ -47,10 +47,10 @@ class Bubble::Thread::Rollup
|
||||
def summarize(entry, chunk_size)
|
||||
case entry.action
|
||||
when "created"
|
||||
"added by #{entry.creator.name} #{time_ago_in_words(entry.created_at)} ago"
|
||||
"added by #{entry.creator.name} #{local_time_ago(entry.created_at)}"
|
||||
when "assigned"
|
||||
summary = "assigned to #{entry.assignee_names.to_sentence}"
|
||||
summary += " #{time_ago_in_words(entry.created_at)} ago" unless first_position?
|
||||
summary += " #{local_time_ago(entry.created_at)}" unless first_position?
|
||||
summary
|
||||
when "boosted"
|
||||
"#{entry.creator.name} +#{chunk_size}"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<div class="comment--upvotes flex-inline flex-wrap align-start gap fill-white border-radius center position-relative">
|
||||
<%= rollup.body %>
|
||||
<div class="comment--upvotes flex-inline flex-wrap align-start fill-white border-radius center position-relative">
|
||||
<%= rollup.body.html_safe %>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user