From 2c6c821e206bd81e7c3b4499e36f754cf2d23959 Mon Sep 17 00:00:00 2001 From: Jose Farias Date: Sat, 12 Oct 2024 23:03:27 -0600 Subject: [PATCH] Use local time for rollups --- app/models/bubble/thread/rollup.rb | 6 +++--- app/views/bubbles/threads/_rollup.html.erb | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/models/bubble/thread/rollup.rb b/app/models/bubble/thread/rollup.rb index 27c760130..89d3d76b5 100644 --- a/app/models/bubble/thread/rollup.rb +++ b/app/models/bubble/thread/rollup.rb @@ -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}" diff --git a/app/views/bubbles/threads/_rollup.html.erb b/app/views/bubbles/threads/_rollup.html.erb index 665807798..aec078644 100644 --- a/app/views/bubbles/threads/_rollup.html.erb +++ b/app/views/bubbles/threads/_rollup.html.erb @@ -1,3 +1,3 @@ -
- <%= rollup.body %> +
+ <%= rollup.body.html_safe %>