Skip to content

Commit

Permalink
Remove 'almost' from time_ago_in_words
Browse files Browse the repository at this point in the history
  • Loading branch information
iHiD committed Oct 25, 2023
1 parent f4f3c5a commit 17eacdb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/helpers/time_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module TimeHelper
def time_ago_in_words(time, short: false)
t = super(time)
t.gsub!(/^about /, '')
t.gsub!(/^almost /, '')

unless short
return "seconds" if t == "a few seconds"
Expand Down
3 changes: 2 additions & 1 deletion app/views/tracks/community_solutions/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@
%p.text-p-base.mb-12 We automatically group similar solutions and generate statistics about how popular they are.
.py-16.shadow-base.rounded-8.bg-white.text-center.grid.grid-cols-3.leading-150
.flex.flex-col
.text-18.font-medium.mb-8.text-textColor2= @exercise_representation.num_published_solutions
.text-18.font-medium.mb-8.text-textColor2= number_with_delimiter(@exercise_representation.num_published_solutions)
.text-15= "Submission".pluralize(@exercise_representation.num_published_solutions)

.flex.flex-col
.text-18.font-medium.mb-8.text-textColor2 #{time_ago_in_words(@exercise_representation.first_submitted_at, short: true)} ago
.text-15 First submitted
Expand Down

0 comments on commit 17eacdb

Please sign in to comment.