diff options
author | Starfall <us@starfall.systems> | 2022-04-08 01:23:41 -0500 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2022-04-08 01:23:41 -0500 |
commit | 8da73d2e57284c765b232bfc6842a7ac0f0a702b (patch) | |
tree | 8f04f4d701e86d4ddadbdd6054171ed374523a7d /app/helpers | |
parent | f7491de676298b8f78084c00f0026f8cf36d92fc (diff) | |
parent | e0c39f9fad837b77373220515f078f2443ddf553 (diff) |
Merge remote-tracking branch 'glitch/main'
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 7 | ||||
-rw-r--r-- | app/helpers/formatting_helper.rb | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d482ad1a2..ce25e26f9 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -19,8 +19,11 @@ module ApplicationHelper # is looked up from the locales definition, and rails-i18n comes with # values that don't seem to make much sense for many languages, so # override these values with a default of 3 digits of precision. - options[:precision] = 3 - options[:strip_insignificant_zeros] = true + options = options.merge( + precision: 3, + strip_insignificant_zeros: true, + significant: true + ) number_to_human(number, **options) end diff --git a/app/helpers/formatting_helper.rb b/app/helpers/formatting_helper.rb index 2a622ae0b..53e100dd2 100644 --- a/app/helpers/formatting_helper.rb +++ b/app/helpers/formatting_helper.rb @@ -12,6 +12,7 @@ module FormattingHelper def extract_status_plain_text(status) PlainTextFormatter.new(status.text, status.local?).to_s end + module_function :extract_status_plain_text def status_content_format(status) html_aware_format(status.text, status.local?, preloaded_accounts: [status.account] + (status.respond_to?(:active_mentions) ? status.active_mentions.map(&:account) : []), content_type: status.content_type) |